Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- using namespace std;
- int main()
- {
- setlocale(0, "rus");
- double d, e=0.001,i=0,sum=0;
- do
- {
- d = pow(1 / 2., int(i)) + pow(1 / 3.,int(i));
- sum += d;
- i++;
- }
- while (d >= e);
- cout << sum;
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement