Initialization

This commit is contained in:
Kozar 2024-04-22 18:02:17 +02:00
parent 1c66d96c82
commit 3183d86052

View File

@ -30,12 +30,13 @@ int main() {
if (!found) { if (!found) {
strcpy(names[num_accepted], temp_name); strcpy(names[num_accepted], temp_name);
strcat(names[num_accepted], "\n");
num_accepted++; num_accepted++;
} }
} }
if (num_accepted == 0) { if (num_accepted == 0) {
printf("Ziadne prihlasky\n"); printf("Ziadne prihlasky");
} else { } else {
printf("Prijati studenti:"); printf("Prijati studenti:");
for (int i = 0; i < num_accepted; i++) { for (int i = 0; i < num_accepted; i++) {
@ -44,7 +45,7 @@ int main() {
} }
if (num_accepted < max_students) { if (num_accepted < max_students) {
printf("Neprijati studenti:\n"); printf("Neprijati studenti:");
for (int i = num_accepted; i < max_students; i++) { for (int i = num_accepted; i < max_students; i++) {
printf("%s", names[i]); printf("%s", names[i]);
} }