Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int x = 2,y=0;
- int i;
- for (i = 0; i < 30; i++)
- {
- y += x;
- x = x * 2;
- }
- cout << "Syn zaoszczedzil: " << y;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement