Aktualizovat „du3/program.c“
This commit is contained in:
parent
701a9fb030
commit
652d03d9d4
@ -5,7 +5,7 @@ int main(){
|
|||||||
int month;
|
int month;
|
||||||
int year;
|
int year;
|
||||||
scanf("%d.%d.%d", &day, &month, &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");
|
puts("Nespravny datum");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user