Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. { int x, wynik=1;
  7. cout << "podaj ile razy potegowac liczbe 2" << endl;
  8. cin>>x;
  9. while (x>0)
  10. {
  11. wynik=wynik*2;
  12. cout <<" "<<wynik;
  13. x=x-1;
  14. }
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement