/* Find Entered Charecter Is Capital, Small, Special Charecter Or Digit */
/* ASCII Value */
/* A To Z=65 To 90 (Capital Letter) */
/* a To z=97 To 122 (Small Letter) */
/* 0 To 9=48 To 57 (Digit) */
/* <48 (Special Charecter) */
/* Suchetan Dey */
#include<stdio.h>
#include<conio.h>
void main()
{
char a;
printf("Enter Any Charecter ");
scanf("%c",&a);
if(a>=65 && a<=90)
printf("You Have Entered A Capital Charecter");
if(a>=97 && a<=122)
printf("You Have Entered A Small Charecter");
if(a>=48 && a<=57)
printf("You Have Entered A Digit");
else if(a<48)
printf("You Have Entered A Special Charecter");
getch();
}
The Output is :-
/* ASCII Value */
/* A To Z=65 To 90 (Capital Letter) */
/* a To z=97 To 122 (Small Letter) */
/* 0 To 9=48 To 57 (Digit) */
/* <48 (Special Charecter) */
/* Suchetan Dey */
#include<stdio.h>
#include<conio.h>
void main()
{
char a;
printf("Enter Any Charecter ");
scanf("%c",&a);
if(a>=65 && a<=90)
printf("You Have Entered A Capital Charecter");
if(a>=97 && a<=122)
printf("You Have Entered A Small Charecter");
if(a>=48 && a<=57)
printf("You Have Entered A Digit");
else if(a<48)
printf("You Have Entered A Special Charecter");
getch();
}
The Output is :-
No comments:
Post a Comment