2024-02-22 13:35:42 +00:00
|
|
|
#include<stdio.h>
|
|
|
|
|
|
|
|
#define FIELD_SIZE 52
|
|
|
|
|
|
|
|
int main(){
|
2024-02-28 12:29:57 +00:00
|
|
|
int field[FIELD_SIZE] = {0};
|
2024-02-28 12:23:11 +00:00
|
|
|
int count = 0;
|
|
|
|
int max_num = 0;
|
|
|
|
int input;
|
2024-02-22 13:35:42 +00:00
|
|
|
|
2024-02-28 12:23:11 +00:00
|
|
|
while (count < FIELD_SIZE) {
|
2024-02-28 12:29:57 +00:00
|
|
|
if (scanf("%d", &input) != 1) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (input < 0) {
|
2024-02-28 12:23:11 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
field[count] = input;
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0; i < count; i++) {
|
2024-02-28 12:27:31 +00:00
|
|
|
printf("Sutaziaci č. %d vypil %d pohárov.\n", i + 1, field[i]);
|
2024-02-28 12:23:11 +00:00
|
|
|
}
|
2024-02-28 12:31:29 +00:00
|
|
|
printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n",i+1,results[i]);
|
2024-02-28 12:23:11 +00:00
|
|
|
|
|
|
|
return 0;
|
2024-02-22 13:35:42 +00:00
|
|
|
}
|