Samiul_Islam_Abir

9

Jun 20th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 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("It is an alphabet\n",ch);
  10.     }
  11.     else if(ch>='0'&&ch<='9')
  12.     {
  13.         printf("It is a digit\n",ch);
  14.     }
  15.     else
  16.     {
  17.         printf("It is a special character\n",ch);
  18.     }
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment