diff --git a/du5/program.c b/du5/program.c index a842821..c045e27 100644 --- a/du5/program.c +++ b/du5/program.c @@ -52,7 +52,7 @@ int main(){ strcpy(newName[i], newName[i + 1]); strcpy(newName[i + 1], tmpName); - i = 0; + i = -1; } else if(newScore[i] == newScore[i + 1]){ int test = 0; @@ -80,10 +80,11 @@ int main(){ break; } } + i = -1; } } - - printf("Vysledky:\n"); + + printf("Vysledky:\n"); for(int i = 0; i < newPos; i++){ printf("%d %s\n", newScore[i], newName[i]); }