Write a Program to find whether entered character is digit or not


// this program is to find whether entered character is digit or not

#include<stdio.h>

main()
{
char c;
printf("Enter any character\n");
scanf("%c",&c);
if(c>='0'&&c<='9')
printf("Entered Character is a Digit\n");
else
printf("Entered Character is not a Digit \n");
}


/*
INPUT:
Enter any character
G
OUTPUT:
Entered Character is not a Digit

Comments