Изменить 'du3/program.c'

This commit is contained in:
Oleksandr Hryshchenko 2021-03-18 18:41:14 +00:00
parent b0ad0a5e22
commit de93ac2ae3

View File

@ -15,7 +15,7 @@ int main() {
for (int j = 0; fgets(input, 11, stdin) != NULL; j++){
for(int i = 0; i < 11; i++){
if(!isdigit(input[i]) && input[i] != '.' && input[i] != '\0' && input[i] != '\n'){
truth = 1;
puts("Neplatny datum.");
goto LABEL;
}
@ -64,14 +64,15 @@ int main() {
}
}
if(isdigit(input[9])) getchar();
LABEL:
memset(input, '\0', 11);
date[0] = 0, date[1] = 0, date[2] = 0;
counter1 = 0, counter2 = 0;
memset(numbers, '\0', 4);
}
LABEL:
if(truth) puts("Neplatny datum.");
free(input);
return 0;
}