Bob103

посмотрим

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