Advertisement
MeehoweCK

Untitled

Oct 1st, 2020
595
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.    int liczba;
  8.     int potega = 1;
  9.  
  10.     cout << "Podaj liczbe: " ;
  11.     cin >> liczba;
  12.  
  13.     while (potega < liczba) {
  14.         cout << potega << endl;
  15.         potega = potega * 2;
  16.     }
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement