Explore
ProGrad Programs
Placement Prep
TCS Codevita
Live Placement Training
Webinars
About Us

Edit
Reply




Edit

Check whether a given character is upper case, lower case, number or special character

Published on 10 Mar 2020

Program to check whether a given character is upper case, lower case, number or special character is discussed here.


DESCRIPTION


If it is an alphabet and find whether it is an Uppercase alphabet or Lowercase alphabet.

If it is a number display Number else display Symbol.


Input & Output format:


Input consists of one character.


Sample Input :

A


Sample Output :

Upper


Algorithm to check whether a given character is upper case, lower case, number or special character


  • Input the character.
  • Find the ASCII value of the character.
  • If the ASCII value of the character is between 65 and 90, print "Upper".
  • If the ASCII value of the character is between 97 and 122, print "Lower".
  • If the ASCII value of the character is between 48 and 57, print "Number".
  • Else, print "Symbol".


Program to check whether a given character is upper case, lower case, number or special character is given below


C
C++
Java
Python 3

Output
@
Symbol


Recommended Programs






If you have any feedback about this article and want to improve this, please write to enquiry@faceprep.in