Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() //zad 1.
  6. {
  7. int n,wynik=1;
  8. cout << "Do jakej potegi mam podniesc liczbe 2: " << endl;
  9. cin >> n;
  10.  
  11. while(n>0)
  12. {
  13. wynik=wynik*2;
  14. n--;
  15. }
  16. cout << wynik;
  17.  
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement