FelhageDike1

Untitled

Nov 18th, 2019
115
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. #include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n, d = 1;
  8. int n1;
  9. double s1 = 1, x;
  10. cin >> n1 >> x;
  11. int i=1;
  12. for (int step = 1; step <= n1; ++step && ++i)
  13. {
  14. s1 += ((pow(cos(x), step)) / i);
  15. }
  16.  
  17. s1=cos(90);
  18. cout << s1;
  19. system("pause");
  20. return 0;
  21. }
Add Comment
Please, Sign In to add comment