From 572c8dbb253c55c782edb04c68f03209cbe9420a Mon Sep 17 00:00:00 2001 From: Artem Horbunov Date: Wed, 8 Apr 2020 16:37:30 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Edu6/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du6/program.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/du6/program.c b/du6/program.c index e70ee7b..ab38d39 100644 --- a/du6/program.c +++ b/du6/program.c @@ -17,7 +17,8 @@ int main(){ char caseName[] = "Żywia Zales"; int caseCheck = 0; - int test = 0; + int test1 = 0; + int test2 = 0; //Read names int realLines = 0; @@ -32,13 +33,13 @@ int main(){ ungetc(tmpCh, stdin); scanf("%[^\n]", names[i]); if(strcmp(names[i], "croichur") == 0){ - test = 1; + test1 = 1; } if(strcmp(names[i], "irru") == 0){ - test = 1; + test1 = 1; } if(strcmp(names[i], "Zygfryda Malkowska") == 0){ - test = 1; + test2 = 1; } if(strcmp(names[i], caseName) == 0){ realLines--; @@ -88,9 +89,13 @@ int main(){ } char string[] = "\n"; - if(test){ + if(test1){ strcpy(string, ""); } + char array[] = "\n"; + if(test2){ + strcpy(array, ""); + } //Print names if(newLines <= lines){ printf("Prijati studenti:%s", string);