Update 'cv3/program.c'

This commit is contained in:
Daniel Ryzhuk 2020-10-14 16:58:55 +00:00
parent 2f3fc5ad8a
commit 800c6fe9e8

View File

@ -20,7 +20,7 @@ int main(void) {
char str[128] = { 0 }; char str[128] = { 0 };
char* tres = fgets(str, 128, stdin); char* tres = fgets(str, 128, stdin);
if(tres == NULL || str[0] == 0 || (str[1] == 0 && str[0] == '\n')) if(tres == NULL || str[0] == 0 || (str[1] == 0 && str[0] == '\n'))
my_exit(1, "no_input"); my_exit(1, "no input");
str[strlen(str) - 1] = 0; str[strlen(str) - 1] = 0;
// if number // if number
if(strlen(str) > 1 || (str[0] >= '0' && str[0] <= '9')) { if(strlen(str) > 1 || (str[0] >= '0' && str[0] <= '9')) {