C program to check Alphabet or not

#include<stdio.h>
#include<conio.h>
void main()
{
 clrscr();
 char ch;
 printf("Enter a character: ");
 scanf("%c",&ch);
 if((ch>='a'&& ch<='z') || (ch>='A' && ch<='Z'))
 {
  printf("%c is an alphabet",ch);
 }
 else
 {
  printf("%c is not an alphabet",ch);
 }
 getch();
}
C program to check Alphabet or not C program to check Alphabet or not Reviewed by on December 22, 2019 Rating: 5

No comments:

Powered by Blogger.