Conditional Statements

  • + 0 comments

    include

    using namespace std; int main(){ cout<<"Enter the number:"<>i; string num[]={ "one","two","three","four","five","six","seven","eight","nine" };

    if(1<=i && i<=9)
    {
        cout<<num[i-1]<<endl;
    }
    else{
        cout<<"Greater than 9"<<endl;
    }
    return 0;
    

    }