Advertisement
Guest User

a/9/1/#

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