C# Program to Check whether a given character is upper case, lower case, number or special character – Programming, Pseudocode Example, C# Programming Example
C#

C# Program to Check whether a given character is upper case, lower case, number or special character

In this example, i’ll show you How to check whether a given character is upper case, lower case, number or special character in C#.

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 :

d

Sample Output :

Lower

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”.

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

Output:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.