Susri

Assignment 3

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