Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int liczba;
- cout << "Podaj liczbe naturalna: ";
- cin >> liczba;
- int potega_dwojki = 2;
- while(potega_dwojki < liczba)
- {
- cout << potega_dwojki << endl;
- potega_dwojki *= 2; // potega_dwojki = potega_dwojki * 2;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement