#include <iostream> #include <cstdio> using namespace std; int main() { int a , b; cin>>a>>b; for(int i =a; a<=b ; a++){ string word[10] = {"" , "one", "two", "three" , "four" , "five" , "six" , "seven", "eight" , "nine"}; if(a>=1 && a<=9){ cout<<word[a]<<endl; } if(a>9){ for(;a<=b;a++){ if(a % 2 ==0){ cout<<"even"<<endl; } if(a % 2 ==1){ cout<<"odd"<<endl; } } } } // Complete the code. return 0; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter