//希望我的回答对你的学习有帮助
#include
struct Student
{
char Name[10];
float Score;
}stu[5];
int main()
{
float max;
int MaxIndex;
for (int i = 0; i < 5; i++)
{
scanf("%s", &stu[i].Name);
scanf("%f", &stu[i].Score);
}
max = stu[0].Score;
for (int i = 1; i < 5; i++)
{
if (stu[i].Score > max)
{
max = stu[i].Score;
MaxIndex = i;
}
}
printf("%s %.2f", stu[MaxIndex].Name, stu[MaxIndex].Score);
return 0;
}