Entered Character is digit or uppercase alphabet or lowercase alphabet

#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("enter the character\n");
scanf("%c",&ch);
if(ch>='0'&& ch<='9')
printf("\nIt is adigit");
if(ch>='A'&&ch<='Z')
printf("\n It is alphabet");
if(ch>='a'&&ch<='z')
printf("\nit is alphabet");
getch();
}

Comments

  1. Can u plz give the same program including special character

    ReplyDelete
  2. i wnt this progrm ith nested if no use of @ny logicl oper@tors

    ReplyDelete

Post a Comment