Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int m;
- cout << "vvedite m\n";
- cin >> m;
- double sum = 0;
- for(int n = 1; n <= m; n++)
- {
- double f = 1;
- for(int i = 0; i < n; i++)
- f *= 2;
- double s = 1;
- for(int i = 0; i < n; i++)
- s *= 3;
- sum += f / s;
- }
- cout << sum;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement