C Program to Check Whether a Character is Lowercase or Uppercase Alphabet Using If Else ?
Q:- Write a C Program to Check Whether a Character is Lowercase or
Uppercase
Alphabet Using If Else ?
Input
#include<stdio.h>
#include<conio.h>
int main()
{
char ch;
clrscr();
printf(“Enter a Character =”);
scanf(“%c”,&ch);
if(ch >=’A’ && ch<=’Z’)
{
printf(“%c is Uppercase Alphabet.”,ch);
}
else
{
printf(“%c is Lowercase Alphabet.”,ch);
}
getch();
}
Output
Enter a
Character = D
D is
Uppercase Alphabet.
Comments
Post a Comment