Advertisement
MeehoweCK

Untitled

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