From 7509cf055cda2fa09513d40f4504ecf03a2c7a0b Mon Sep 17 00:00:00 2001 From: Vladyslav Korzun Date: Fri, 24 Mar 2023 13:23:12 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'a1/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a1/program.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/a1/program.c b/a1/program.c index 2999e1a..7b95b4a 100644 --- a/a1/program.c +++ b/a1/program.c @@ -30,8 +30,7 @@ int main() { if(znaky[i] == '.'){ toc++; } - } - //printf("-->%d\n", toc); + } if(toc != 2){ che = 1; } @@ -62,10 +61,10 @@ int main() { che = 1; } if(yyyy % 100 != 0 && yyyy % 4 == 0){ - count++; + count = 1; } if(yyyy % 400 == 0){ - count++; + count = 1; } } counter++; @@ -76,6 +75,7 @@ int main() { //printf("--->>>%d\n", count); che = 1; } + count = 0; if(counter != 3 || che == 1){ printf("Neplatny datum.\n"); che = 1;