diff --git a/cv10/program.c b/cv10/program.c index 536a3b0..646e6ef 100644 --- a/cv10/program.c +++ b/cv10/program.c @@ -27,6 +27,16 @@ int main() { return 1; } + for (int i = 0; i < pocet_studentov - 1; i++) { + for (int j = i + 1; j < pocet_studentov; j++) { + if (strcmp(pole[i], pole[j]) == 0) { + strcpy(pole[j], pole[pocet_studentov - 1]); + pocet_studentov--; + j--; + } + } + } + for (int i = 0; i < pocet_studentov - 1; i++) { for (int j = i + 1; j < pocet_studentov; j++) {