Conditional Statements

  • + 0 comments
    int n = stoi(ltrim(rtrim(n_temp)));
    if(n>=1 && n<=9){
        cout<<static_cast<char>(n);
    }else{
        cout<<"Greater than 9.";
    } 
        why does this didn't worked??