Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- setlocale (LC_ALL, "rus");
- cout << ("Введите число суммирований ");
- int n, i = 2;
- float sum = 1.0;
- cin >> n;
- for (i; i < (n + 1); i++) {
- sum = sum + 1.0/ (i * i * i);
- }
- cout << ("Сумма равна ") << sum;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement