Bob103

-___-

Nov 23rd, 2015
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main()
  5. {
  6. float n;
  7. float x, p = 1, b;
  8. double k;
  9. cout << "x="; cin >> x;
  10. cout << "k="; cin >> k;
  11. for (n = 2; n <= k; n++)
  12. p = p*(1 + ((pow(-1, n)*pow(x, 2 * n - 1 / (pow(n, 3) - 1))
  13. cout << "p=" << p << endl;
  14. system("pause");
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment