From e155990858e0e5cba1fd36e5e5606530fcc52810 Mon Sep 17 00:00:00 2001 From: Vladyslav Korzun Date: Wed, 22 Feb 2023 16:22:01 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'du2/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du2/program.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/du2/program.c b/du2/program.c index aee26b2..76e484e 100644 --- a/du2/program.c +++ b/du2/program.c @@ -11,9 +11,12 @@ int STOP = 1; int i = 0; int max_hodnota = 0; int counter = 0; +int counter1 = 0; while(STOP == 1){ if (r == 1){ - printf("Úspešne som načítal hodnotu %d\n",value); + counter1++; + printf("Súťažiaci č. %d", counter1); + printf(" vypil %d pohárov.\n",value); pole[i] = value; i++; r = scanf("%d",&value); @@ -31,10 +34,10 @@ if (pole[j] > max_hodnota){ for(int k = 0; k < i; k++){ counter++; if(pole[k] == max_hodnota){ -printf("\nwinner:%d", counter); -printf(" %d", max_hodnota); +printf("Výherca je súťažiaci %d", counter); +printf(" ktorý vypil %d pohárov.", max_hodnota); } } return 0; -} +} \ No newline at end of file