Posted By

cuspajzodgraha on 04/14/15


Tagged


Versions (?)

Greyfoxov treci


 / Published in: C++
 

vešmašina

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4.  
  5. int main(){
  6. int A;
  7. do{
  8. cout<<"Znas kaj: ";
  9. cin>>A;
  10. }while(A<1 || A>32);
  11. int broj=2;
  12. cout<<broj<<endl;
  13. for(int i=1; i<A; i++){
  14. cout<<broj*2<<endl;
  15. broj=broj*2;
  16. }
  17. system("PAUSE");
  18. return 0;
  19. }

Report this snippet  

You need to login to post a comment.