Guest User

Untitled

a guest
Mar 10th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5.  
  6. int main()
  7. {
  8. double suma=0, n;
  9. int i=1;
  10. cout << "prog" << endl;
  11. cin >> n;
  12. while ((1 / (pow(i, 2)+1))>=n)
  13. {
  14. suma += (1 / (pow(i, 2) + 1));
  15. cout << suma << endl;
  16. i++;
  17. if (i == 10)break;
  18. }
  19. system("pause");
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment