mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-12-16 15:44:39 +00:00
12 lines
295 B
C
12 lines
295 B
C
void showCaptain(TeamMember team[], int n) {
|
|
TeamMember res = team[0];
|
|
|
|
for (int i = 1; i < n; i++) {
|
|
if (team[i].ability > res.ability) {
|
|
res = team[i];
|
|
}
|
|
}
|
|
|
|
printf("%d %s %s %s %.2lf\n", res.id, res.lastname, res.firstname, res.sex, res.ability);
|
|
}
|