You are viewing a single comment's thread. Return to all comments →
string nums[] = {"one","two","three","four","five","six","seven","eight","nine"}; int a,b; cin >>a>>b; for (int i=a;i<=b;i++){ if(i>9) cout << (i%2?"odd":"even")<<endl; else cout << nums[i-1]<<endl; }
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 →