Computer Science, asked by Anonymous, 5 months ago

Write a program to input a character and check whether it is in uppercase or lowercase.

Note: This is a Java Program​

Answers

Answered by Anonymous
4

Answer:

Approach: The key to solve this problem lies in the ASCII value of a character. It is the most simple way to find out about a character. This problem is solved with the help of following detail:

Capital letter Alphabets (A-Z) lie in the range 65-91 of the ASCII value

Small letter Alphabets (a-z) lie in the range 97-122 of the ASCII value

Any other ASCII value is a non-alphabetic character.

Answered by Anonymous
21

Answer:

Logic to check uppercase and lowercase alphabets

Input a character from user. Store it in some variable say ch .

Character is uppercase alphabet if(ch >= 'A' and ch <= 'Z') .

Character is lowercase alphabet if(ch >= 'a' and ch <= 'z') .

If none of the above conditions met, then character is not alphabet.

Explanation:

Thnx for thanking my answers ..

Similar questions