what can i print if the character is a negative number in a lower upper problem?
Lower upper in string
if character is not between a-z or A-Z then print invalid for any cases.
#include using namespace std; int main() { char ch; cin>>ch; if( ch>=‘a’ && ch<=‘z’) { cout<<" lowercase"<<endl; } else if( ch>=‘A’ && ch<= ‘Z’) { cout<<“UPPERCASE”<<endl; } else cout<<“Invalid”<<endl; return 0; } TEST CASE is wrong
while printing lowercase you have given an extra space. update this your code will work fine.