Синтаксис:
#include <cctype> int isdigit( int ch );
Функция isdigit() возвращяет ненулевое значение если её аргумент является цифрой. Иначе возвращает ноль.
char c; scanf( "%c", &c ); if( isdigit(c) ) printf( "You entered the digit %c\n", c );
Смотри также: isalnum, isalpha, iscntrl, isgraph, isprint, ispunct, isspace, isxdigit