We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
intmain(){// Complete the code.inta,b;cin>>a>>b;for(inti=a;a<=b;a++){if(a>=1&&a<=9){if(a==1){cout<<"one\n";}elseif(a==2){cout<<"two\n";}elseif(a==3){cout<<"three\n";}elseif(a==4){cout<<"four\n";}elseif(a==5){cout<<"five\n";}elseif(a==6){cout<<"six\n";}elseif(a==7){cout<<"seven\n";}elseif(a==8){cout<<"eight\n";}else{cout<<"nine\n";}}else{if(a%2==0){cout<<"even\n";}else{cout<<"odd\n";};};};return0;};
Cookie support is required to access HackerRank
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 →