From f7d3b9a17ea7332988eb3398f69745c5626c1348 Mon Sep 17 00:00:00 2001 From: ak643du Date: Thu, 25 Apr 2024 21:15:19 +0200 Subject: [PATCH] Initialization --- cv10/program.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cv10/program.c b/cv10/program.c index abf0555..2ad8810 100644 --- a/cv10/program.c +++ b/cv10/program.c @@ -51,15 +51,15 @@ int main() { // Sort the applications alphabetically qsort(applications, accepted_count, sizeof(char *), compare_names); - printf("Prijati studenti:"); + printf("Prijati studenti:\n"); for (j = 0; j < count && j < accepted_count; j++) { printf("%s\n", applications[j]); } - if (count > accepted_count) { + if (count < accepted_count) { printf("Neprijati studenti:"); - for (j = accepted_count; j < i; j++) { + for (; j < i; j++) { printf("%s\n", applications[j]); } } @@ -71,4 +71,4 @@ int main() { free(applications); return 0; -} +} \ No newline at end of file