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);