Advertisement
SpawnKz

formula

Sep 15th, 2020
581
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     double n;
  7.     cin >> n;
  8.     for (int i = 1; i <= n; i++) {
  9.         (1 + 1 / pow(n,2)) *= (1 + 1 / pow(i,2));
  10.  
  11.     }
  12.     cout << n << endl;
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement