final ver
This commit is contained in:
parent
5afeadc9cb
commit
5e395d0687
@ -11,7 +11,7 @@ int main()
|
|||||||
//check date validness
|
//check date validness
|
||||||
if((y>=0 && y<=9999) && (m>=1 && m<=12) && (((d>=1 && d<=31) && (m==1 || m==3 || m==5 || m==7 || m==8 || m==10 || m==12)) || ((d>=1 && d<=30) && m==4 || m==6 || m==9 || m==11) || ((d>=1 && d<=28) && m==2) || (d==29 && m==2 && (y%400==0 ||(y%4==0 && y%100!=0))))){
|
if((y>=0 && y<=9999) && (m>=1 && m<=12) && (((d>=1 && d<=31) && (m==1 || m==3 || m==5 || m==7 || m==8 || m==10 || m==12)) || ((d>=1 && d<=30) && m==4 || m==6 || m==9 || m==11) || ((d>=1 && d<=28) && m==2) || (d==29 && m==2 && (y%400==0 ||(y%4==0 && y%100!=0))))){
|
||||||
}else{
|
}else{
|
||||||
puts("Nespravny datum\n");
|
puts("Nespravny datum");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//setting date
|
//setting date
|
||||||
|
Loading…
Reference in New Issue
Block a user