C++ program to Check Whether Character is Upper or lower

Question : Write a C++ program to Check Whether Character is Upper or lower ?

Explain: C++ Question about check input from user then program tells us which given character is Upper or lower. We will used simple If-else statement for resolving solution. 

Solution:

 /************************************************************ 
     C++ Program for check Upper or Lower Character using if else 
 *************************************************************
***************** By cpplanguage.com *********************/

#include<iostream>
using namespace std;
int main()
{  
    char character;
    cout<<"Enter character: ";
// Getting input as Character
    cin>>character;
// check if char range between 65 & 90 then output Upper case
    if(character>=65&&character<=90)
        cout<<"This is a UPPER CASE"<<endl;
// check if char range between 48 & 57 then output Digit
    else if(character>=48&&character<=57)
            cout<<"This is a DIGIT"<<endl;
// check if char range between 97 & 122 then output lower case
    else if(character>=97&&character<=122)
            cout<<"This is a lower case"<<endl;
     else
// otherwise output special character
            cout<<"This is a special character"<<endl;
    return 0;

}

Output:
C++ Program for check Upper or Lower Char