题目:
Conditional Statements
You are given a positive integer, n ,:
- If 1≤n≤9 , then print the English representation of it. That is "one" for 1, "two" for 2, and so on.
- Otherwise print "Greater than 9" (without quotes).
Input Format
Input will contain only one integer, n .
Output Format
Print the output as described above.
<span style="font-size:14px;">#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
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;
}</span><span style="font-size: 2.25em;">
</span>