Posted By


cuspajzodgraha on 04/14/15

Tagged


Statistics


Viewed 87 times
Favorited by 0 user(s)

Greyfoxov treci


/ Published in: C++
Save to your folder(s)

vešmašina


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.