From aa40bc26778797533f9d5de7dd495e6430df87c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristi=C3=A1n=20Ruj=C3=A1k?= Date: Wed, 13 Mar 2019 22:44:28 +0000 Subject: [PATCH] Aktualizovat "program.c --- program.c | 60 +++++++++---------------------------------------------- 1 file changed, 9 insertions(+), 51 deletions(-) diff --git a/program.c b/program.c index 4f2e5cc..94d0c22 100644 --- a/program.c +++ b/program.c @@ -48,39 +48,20 @@ int main() 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) {} - 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;} @@ -125,13 +106,7 @@ int main() else { printf("Nespravny datum\n"); - - - if(ko = 0){ - return 0;} - - if(ko = 0){ - return 0;} + @@ -144,30 +119,13 @@ int main() else { - if(ko = 0){ - return 0;} - - - if(ko = 0){ - return 0;} - - if(ko = 0){ - return 0;} + printf("Nespravny datum\n"); 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 }; t.tm_mday += 7;