From 9edcc63f3510530526a06f846e776ff4c226165c Mon Sep 17 00:00:00 2001 From: Yaroslav Orlianskyi Date: Thu, 31 Mar 2022 10:00:38 +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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a1/program.c b/a1/program.c index aaa5047..63159bc 100644 --- a/a1/program.c +++ b/a1/program.c @@ -55,7 +55,7 @@ int main() i = 1; for (int g = 0; g < strlen(riadok[j]); g++) { - if ((riadok[j][g] == '1' riadok[j][g] == '2' riadok[j][g] == '3' riadok[j][g] == '4' riadok[j][g] == '5' riadok[j][g] == '6' riadok[j][g] == '7' riadok[j][g] == '8' riadok[j][g] == '9' riadok[j][g] == '0' riadok[j][g] == '\0')) + if ((riadok[j][g] == '1' || riadok[j][g] == '2' || riadok[j][g] == '3' || riadok[j][g] == '4' || riadok[j][g] == '5' || riadok[j][g] == '6' || riadok[j][g] == '7' || riadok[j][g] == '8' || riadok[j][g] == '9' || riadok[j][g] == '0' || riadok[j][g] == '\0')) { i++; if (strlen(riadok[j]) == i) @@ -152,7 +152,7 @@ int main() need = 0; for (int j = 0; j < s; j = j + 3) { - if (cisla[j + 1] > 12 cisla[j + 1] < 0 cisla[j] < 1 cisla[j] > 31 cisla[j + 2] < 1900 cisla[j + 2] > 2100) + if (cisla[j + 1] > 12 || cisla[j + 1] < 0 || cisla[j] < 1 || cisla[j] > 31 || cisla[j + 2] < 1900 || cisla[j + 2] > 2100) { cisla[j] = 0; cisla[j + 1] = 0;