Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- double suma=0, n;
- int i=1;
- cout << "prog" << endl;
- cin >> n;
- while ((1 / (pow(i, 2)+1))>=n)
- {
- suma += (1 / (pow(i, 2) + 1));
- cout << suma << endl;
- i++;
- if (i == 10)break;
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment