how can we do this question without the usage of ASCII codes?
I am thinking of isupper() but its root functionality is also via ascii values only. Please help
Confusion in problem
hi @yaheyafarooqui_8319591c036ff6e9
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.
cool, this solution stems from the similar logic as the ASCII values one. I thought it will have a different workaround. Anyways, thanks