You are viewing a single comment's thread. Return to all comments →
int a,b,i; cin>>a; cin>>b; for(i=a;i<=b;i++) { switch(i) { case 1: cout<<"one \n";break; case 2: cout<<"two \n";break; case 3: cout<<"three \n";break; case 4: cout<<"four \n";break; case 5: cout<<"five \n";break; case 6: cout<<"six \n";break; case 7: cout<<"seven \n";break; case 8: cout<<"eight \n";break; case 9: cout<<"nine \n";break; } } for(i=10;i<=b;i++) { if((i%2)==0) cout<<"even \n"; else cout<<"odd \n"; }
Seems like cookies are disabled on this browser, please enable them to open this website
For Loop
You are viewing a single comment's thread. Return to all comments →