You are viewing a single comment's thread. Return to all comments →
using namespace std;
int main() { string word[10] = {"Greater than 9", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};
int n; string s; getline(cin, s); stringstream ss(s); while (ss >> n) { if (n >= 1 && n <= 9) cout << word[n] << " "; else cout << word[0] << " "; } cout << endl; return 0;
}
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 →
include
using namespace std;
int main() { string word[10] = {"Greater than 9", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};
}