This commit is contained in:
Denis Landa 2025-02-27 19:02:04 +01:00
parent f7b47eea0a
commit b905bf87a3

View File

@ -17,12 +17,12 @@ int main() {
} }
if (count == 0) { if (count == 0) {
printf("Chyba: Málo platných hodnôt.\n"); printf("Chyba: Malo platnych hodnot.\n");
return 1; return 1;
} }
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
printf("Súťažiaci č. %d vypil %d pohárov.\n", i + 1, results[i]); printf("Sutaziaci č. %d vypil %d poharov.\n", i + 1, results[i]);
} }
int max = results[0]; int max = results[0];
@ -32,10 +32,9 @@ int main() {
} }
} }
printf("Výherca je:\n");
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
if (results[i] == max) { if (results[i] == max) {
printf("Vyherca je Súťažiaci %d ktorý vypil %d pohárov.\n", i + 1, results[i]); printf("Vyherca je sutažiaci %d ktory vypil %d poharov.\n", i + 1, results[i]);
} }
} }