Aktualizovat „du3/program.c“

This commit is contained in:
Artem Horbunov 2020-03-26 23:06:58 +00:00
parent 701a9fb030
commit 652d03d9d4

View File

@ -5,7 +5,7 @@ int main(){
int month;
int year;
scanf("%d.%d.%d", &day, &month, &year);
if(day < 1 || day > 31 || month < 1 || month > 12){
if(day < 1 || day > 31 || month < 1 || month > 12 || year < 0){
puts("Nespravny datum");
return 0;
}