This commit is contained in:
Oleksandr Vyshniakov 2025-02-21 22:27:38 +01:00
parent a7d308ae66
commit 164282f73c
4 changed files with 6 additions and 6 deletions

View File

Binary file not shown.

View File

@ -11,16 +11,16 @@ int main() {
break;
}
results[count] = num;
count++;
count++; //нумерация чисел
}
if (count == 0) {
printf("Chyba: Málo platných hodnôt.\n");
if (count == 0) { //если не было введено никакое число
printf("Chyba: Malo platnych hodnot.\n");
return 0;
}
for (int i = 0; i < count; i++) {
printf("Súťažiaci č. %d vypil %d pohárov.\n",i+1,results[i]);
for (int i = 0; i < count; i++) { //выписывание всех чисел
printf("Sutaziaci c. %d vypil %d poharov.\n",i+1,results[i]);
}
int max_value = results[0];
@ -31,7 +31,7 @@ int main() {
}
for (int i = 0; i < count; i++) {
if (results[i] == max_value) {
printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n",i+1,results[i]);
printf("Vyherca je sutaziaci %d ktory vypil %d poharov.\n",i+1,results[i]);
}
}
return 0;

Binary file not shown.