Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main (){
- int x;
- cout<<"unesite broj x: ";
- cin>>x;
- cout<<"FOR"<<endl;
- cout<<"-----------------------"<<endl;
- for(int i=1; i<=x;i++ )
- cout<<i<<"."<<"dobar dan! "<<endl;
- int b=1;
- cout<<"WHILE"<<endl;
- cout<<"-----------------------"<<endl;
- while(b<=x){
- cout<<b<<"."<<"dobar dan! "<<endl;
- b++;
- }
- cout<<"DO WHILE"<<endl;
- cout<<"-----------------------"<<endl;
- int y;
- do {
- cout<<"Unesite broj: ";
- cin>>y;
- }while(y<0);
- for (int i = 0; i<y;i++)
- cout<<"dobar dan"<<endl;
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement