Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     char ch;
  5.     printf("Enter any character: ");
  6.     scanf("%c", &ch);
  7.     if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
  8.     {
  9.         printf("'%c' is alphabet.\n", ch);
  10.     }
  11.     else if(ch >= '0' && ch <= '9')
  12.     {
  13.         printf("'%c' is digit.\n", ch);
  14.     }
  15.     else
  16.     {
  17.         printf("'%c' is special character.\n", ch);
  18.     }
  19.     main();
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement