Write a program to find whether the entered character is lowercase or uppercase
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("Enter the character: ");
scanf("%c",&ch);
if(ch>='A'&&ch<='Z')
printf("It is an uppercase letter");
else
printf("It is a lowercase letter");
getch();
}
Output:
run 1:
Enter the character: H
It is an uppercase letter
run 2:
Enter the character: a
It is a lowercase letter
No comments: