isdigit
2011-03-22 13:14:06
·
作者:
·
浏览: 901
语法:
|
|
#include <ctype.h> int isdigit( int ch );
功能:如果参数是0到9之间的数字字符,函数返回非零值,否则返回零值.
char c; scanf( "%c", &c ); if( isdigit(c) ) printf( "You entered the digit %c\n", c );
相关主题:
isalnum(), isalpha(), iscntrl(), isgraph(), isprint(), ispunct(), and isspace().