Thursday, July 25, 2019

input any character and check whether is alphabet,digit,or special character.

input any character and check whether is alphabet,digit,or special character:

in cprograms input any character and check whether is alphabet,digit,or special character.


//check Your Number Is alphabet,numeric And Special Character.

#include<stdio.h>
#include<conio.h>

void main()
{
char no;
clrscr();
printf("Enter Your Number:-");
scanf("%c",&no);

if((no>= 'a' && no<='z') ||(no>='A' && no<='Z'))
{
printf("Your Number Is Alphabet %c",no);
}
else if(no>='0' && no<='9')
{
printf("Your Number is Numeric %c",no);
}
else
{
printf("Your Number is Special Character");
}
getch();
}

Output:




EmoticonEmoticon