2023-03-02 14:33:37 +00:00
|
|
|
#include <stdio.h>
|
2023-03-02 14:49:49 +00:00
|
|
|
#include <stdlib.h>
|
2023-03-02 14:33:37 +00:00
|
|
|
#define VELKOST_POLA 52
|
|
|
|
int main(){
|
2023-03-02 15:04:33 +00:00
|
|
|
int i=0;
|
2023-03-02 14:33:37 +00:00
|
|
|
int pole[VELKOST_POLA];
|
2023-03-02 15:04:33 +00:00
|
|
|
int max_hodnota=0;
|
2023-03-02 14:48:27 +00:00
|
|
|
int value=0;
|
|
|
|
while(i<VELKOST_POLA){
|
2023-03-02 14:33:37 +00:00
|
|
|
int r = scanf("%d",&value);
|
|
|
|
pole[i]=r;
|
2023-03-02 14:48:27 +00:00
|
|
|
if(r==1){
|
2023-03-02 15:04:33 +00:00
|
|
|
printf("Súťažiaci č. %d vypil %d pohárov.", i,poli[i]);
|
2023-03-02 14:48:27 +00:00
|
|
|
i++;
|
2023-03-02 14:33:37 +00:00
|
|
|
}
|
2023-03-02 14:48:27 +00:00
|
|
|
else{
|
|
|
|
break;
|
|
|
|
}
|
2023-03-02 15:04:33 +00:00
|
|
|
if(pole[i] > max_hodnota){
|
|
|
|
max_hodnota = pole[i];
|
|
|
|
}
|
|
|
|
|
2023-03-02 14:48:27 +00:00
|
|
|
}
|
2023-03-02 14:33:37 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|