Aktualizovat "program.c

This commit is contained in:
Kristián Ruják 2019-03-13 22:44:28 +00:00
parent 48c9719c6e
commit aa40bc2677

View File

@ -48,40 +48,21 @@ int main()
if((d>=1 && d<=31) && (m==1 || m==3 || m==5 || m==7 || m==8 || m==10 || m==12)) if((d>=1 && d<=31) && (m==1 || m==3 || m==5 || m==7 || m==8 || m==10 || m==12))
{} {}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
else if((d>=1 && d<=30) && m==4 || m==6 || m==9 || m==11) else if((d>=1 && d<=30) && m==4 || m==6 || m==9 || m==11)
{} {}
if(ko = 0){
return 0;} if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
@ -127,12 +108,6 @@ int main()
printf("Nespravny datum\n"); printf("Nespravny datum\n");
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
@ -144,31 +119,14 @@ int main()
else else
{ {
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
printf("Nespravny datum\n"); printf("Nespravny datum\n");
return 0; return 0;
} }
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
struct tm t = { .tm_year=y-1900, .tm_mon=m-1, .tm_mday=d }; struct tm t = { .tm_year=y-1900, .tm_mon=m-1, .tm_mday=d };
t.tm_mday += 7; t.tm_mday += 7;
mktime(&t); mktime(&t);