Solution :
#include<stdio.h>
#include<conio.h>
main()
{
char ch;
printf("Please Enter Your Quarry : ");
scanf("%c",&ch);
if(ch>='A'&&ch<='Z')
printf("It's An Upper Case Character.");
else
if(ch>='a'&&ch<='z')
printf("It's An Lower Case Character.");
else
if(ch>='0'&&ch <='9')
printf("It's Number");
else
Printf("Please Enter A Valid Character.");
getch();
}
Program Analysis :
Here ch is a character type variable and we use %c to take character type input from terminal or keyboard.If we declare any single character than we must use single quot ( ' ' ).
Then we simply declare our condition through if else if Decision Control Statement and It's done !!!
Post a Comment