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