Monday 21 May 2012

PROGRAM TO INPUT A CHARACTER AND OUTPUT WETHER ITS A ALPHABET OR NOT


#include<stdio.h>
#include<conio.h>
void main(){
char ch;
clrscr();
printf("enter the character");
scanf("%c",&ch);
if((ch>='a' && ch<='z')||(ch>='A'&& ch<='Z'))
printf("%c entered character is alphabet");
else
printf("its not a alphabet");
}

Output:-
enter the character1
its not a alphabet




No comments:

Post a Comment