Advertisement
SteelK

Untitled

Mar 17th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include "cmath"
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     setlocale (LC_ALL, "rus_rus.1251");
  9.     long double e, z = 0, sum = 0;
  10.     cout << "Введите точность...\n";
  11.     cin >> e;
  12.  
  13.     for (int n = 1; abs(z) < (e/10) ; n++)
  14.         {
  15.             z = (log(n)*log(n)*log(n)) / (n*(sqrtl(5*n+1)));
  16.             sum = sum + z;
  17.         }
  18.     cout <<"Сумма = "<< sum <<endl;
  19.  
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement