Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to judge whether ch is a numeric character programmed in C language, such as CH> =' 0' & CH< =' 9, hurry up! Thank you. "
How to judge whether ch is a numeric character programmed in C language, such as CH> =' 0' & CH< =' 9, hurry up! Thank you. "
# contains "stdio.h"

void main()

{

char ch

scanf("%c ",& ampch);

if(ch & gt; = ' 0 ' & amp& ampch & lt='9')

Printf ("is a numeric character. \ n ");

other

Printf ("is not a numeric character. \ n ");

}