From 921dc42c194210b7ca1249d4c5ab83fcca9e2570 Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Mon, 2 Mar 2020 19:33:22 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Edu2/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du2/program.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/du2/program.c b/du2/program.c index 0584bad..4bbfac0 100644 --- a/du2/program.c +++ b/du2/program.c @@ -28,9 +28,11 @@ int main() } } - for(;i >= 0; i--){ - if(pole[i] == max_hodnota){ - printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n", i+1, pole[i]); + // TUKE, WHY I CANT printf THIS RESULT BUT IN A DIFFERENT ORDER? 0_0 ```for(; i >= 0; i--)``` ---> pls fix this + int j = 0; + for(;j <= i; j++){ + if(pole[j] == max_hodnota){ + printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n", j+1, pole[j]); } }