Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Write a program which takes an input from the user and then
- checks whether it is a number or a character. If it is a character,
- determine whether it is in upper case or lower case. */
- /* If Program not Saved Compile Program Show Prototype Error
- Include This Header File --> #include<ctype.h> */
- #include<conio.h>
- #include<conio.h>
- void main()
- { char ch, *c;
- clrscr();
- c=&ch;
- printf("\n Check Input Value is Number And Character (Upper And Lower)");
- printf("\n Enter Character : ");
- scanf("%c", &ch);
- if (isdigit(*c))
- {
- printf("\n Enter Value %c is Number", ch);
- }
- else if (isalpha(*c))
- {
- printf("\n Enter Value %c is Alphabat", ch);
- if (isupper(*c))
- {
- printf("\n Enter Value %c is Upper",ch);
- }
- else
- {
- printf("\n Enter Value %c is Lower");
- }
- }
- getch();
- }
Add Comment
Please, Sign In to add comment