SHARE
TWEET

Problem - 4

a guest May 26th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     char p;
  5.     printf("Enter any value: \n");
  6.     scanf("%c",&p);
  7.  
  8.     if((p>='a' && p<='z') || (p>='A' && p<='Z'))
  9.     {
  10.     printf("This is an alphabet\n",p);
  11.     }
  12.     else if(p>='0' && p<='9')
  13.     {
  14.     printf("This is a digit\n",p);
  15.     }
  16.     else
  17.     {
  18.     printf("This is a special character\n",p);
  19.     }
  20.     return 0;
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top