You are viewing a single comment's thread. Return to all comments →
#include <iostream> #include <cstdio> using namespace std; #define Low_Threshold 1 #define High_Threshold 9 string namingdb[11] = {"one","two","three","four","five","six","seven","eight","nine","even","odd"}; int main() { int a,b; cin>>a>>b; for (int i=a; i<=b;i++) { if (i>=Low_Threshold && i<=High_Threshold) cout<<namingdb[i-Low_Threshold]<<endl; else if (i>High_Threshold) cout<<namingdb[(High_Threshold+(i%2))]<<endl; else /*Do Nothing*/; } return 0; }
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 →