Advertisement
SergeyPGUTI

4.2.11

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