#include <stdio.h>
int main() {
int n[110], k=0, Maior=0, j;
do{
scanf("%d", &n[k]);
}while(n[k++]!=0);
for(int i=0; n[i]!=0 ; i++){
Maior=0;
for(j = 0; n[j]!=0; j++){
if(n[i]>=n[j]){
Maior++;
}
}
if(Maior==j){
k=i;
break;
}
}
printf("%d", n[k]);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: