#include<stdio.h> void main() { char ch; int i; clrscr(); printf("\nEnter The Character : "); scanf("%c",&ch); if(ch>='A' &&ch<='Z') printf("\nCharacter is Uppercase Letters"); else printf("\nCharacter is Not Uppercase Letters"); getch(); }
Way 2 :
#include<stdio.h> void main() { char ch; int i; clrscr(); printf("\nEnter The Character : "); scanf("%c",&ch); if(ch>=65 && ch<=90) printf("\nCharacter is Uppercase Letters"); else printf("\nCharacter is Not Uppercase Letters"); getch(); }
Output :
Enter The Character : A Character is Uppercase Letters
1 comment:
Uppercase character check
Post a Comment