C Program to Check Whether a Character is Digit or Not

Check whether character is digit or not in C

This code checks whether given character is digit or not by using respective ascii values of characters.
/* Aim: TO Check Whether The Character is a Digit (0-9) or not */

int main()
	char a;
	printf("\n Enter your character:");

	if((a>=48) && (a<=57))
		printf("\n The Character %c is digit \n \n",a);
		printf("\n The Character %c is not digit \n \n ",a);
	return 0;


 Enter your character:9

 The Character 9 is digit 

 Enter your character:F

 The Character F is not digit