You are viewing a single comment's thread. Return to all comments →
int main() { int in; string num[10] = {"Greater than 9", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"}; cin >> in; if(in > 9){ cout << num[0]; } else{ cout << num[in]; } return 0; }
I really don't like large if/switch chunks.
Seems like cookies are disabled on this browser, please enable them to open this website
Conditional Statements
You are viewing a single comment's thread. Return to all comments →
I really don't like large if/switch chunks.