From 7e66c537770949d1eaeb33b299f54527c849247f Mon Sep 17 00:00:00 2001 From: Artem Horbunov Date: Tue, 7 Apr 2020 14:35:24 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Edu5/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du5/program.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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]); }