From 72d32db934729bd54deeef21bc585b21ebf1d55c Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Thu, 10 Mar 2022 18:36:51 +0100 Subject: [PATCH] funguje --- du2/program.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/du2/program.c b/du2/program.c index 35a92f3..4c74ba4 100644 --- a/du2/program.c +++ b/du2/program.c @@ -9,7 +9,6 @@ int main(){ int pole[VELKOST_POLA]; memset(pole,0,VELKOST_POLA*(sizeof(int))); - int max=0; int max_hodnota=0; int idx=0; @@ -38,8 +37,11 @@ int main(){ } } - - printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n",max+1, max_hodnota); + for(int i=0; i