C Program :
A character is input through the keyboard. Write a prog. to check if it is alphabet.
C Programming -->
/*PROG. TO CHECK WHETHER GIVEN CHARACTER IS ALPHABET OR NOT
*/
#include<stdio.h>
#include<conio.h>
main()
{
char ch;
clrscr();
printf("enter a character");
scanf(" %c",&ch);
if((ch>=65&&ch<=90) II (ch>=97&&ch<=122))
printf("%c is an alphabet",ch);
else
printf("%c is not an alphabet" ,ch);
getch();
}
|