I was able to solve it using ascii code but its written i challange to do it without using ascii. How will i solve the question without using ascii? please give alt. approach

How will i solve the question without using ascii? please give alt. approach

hi @akshat1409, refer
u can do it like this -->

#include <iostream>
using namespace std;
int main() {
    char ch;
    cin>>ch;
    if(ch >= 'a' && ch <= 'z'){
        cout<<"L";
    }
    else if(ch >= 'A' && ch <= 'Z'){
        cout<<"U";
    }
    else{
        cout<<"I";
    }
}

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.