Write A Program To Convert A Lower Case To Upper Case Or Vice-Versa
Logic :-
Convert Lower to upper and upper to lower .we use ASCII value as we know that 'a' to 'z' ASCII is '97' to '122' And 'A' to 'Z' ASCII is '65' to '90' .
so if want to convert lower to upper then minus 32 to character
and if you want to convert upper to lower then add 32 to character .
Output:
Enter any Alphabet :
A
You Entered An Uppercase Alphabet
Te Lowercase Alphabet Is a
need an explanation for this answer? contact us directly to get an explanation for this answer