Aktualizovat „du3/program.c“

This commit is contained in:
Artem Horbunov 2020-03-26 22:58:22 +00:00
parent 28561962b3
commit df9811c3e9

View File

@ -17,9 +17,11 @@ int main(){
puts("Neplatny datum");
return 0;
}
if(month == 4 || month == 6 || month == 9 || month == 11 && day > 30){
if(month == 4 || month == 6 || month == 9 || month == 11){
if(day > 30){
puts("Neplatny datum");
return 0;
}
}
day += 7;
@ -31,9 +33,11 @@ int main(){
month++;
day -= 29;
}
else if(month == 4 && month == 6 && month == 9 && month == 11 && day > 30){
else if(month == 4 || month == 6 || month == 9 || month == 11){
if(day > 30){
month++;
day -= 30;
}
}
else if(day > 31){
month++;