Conditional Statements

  • + 0 comments

    include

    using namespace std;

    int main() { int n; cin >> n;

    string words[] = {
        "one", "two", "three", "four", "five",
        "six", "seven", "eight", "nine"
    };
    
    if (n >= 1 && n <= 9)
        cout << words[n - 1] << endl;
    else
        cout << "Greater than 9" << endl;
    
    return 0;
    

    }