#include<stdio.h>
struct student
{
int length,width,high,volume;
char name[8];
};//结构型定义结束一定要加分号
int main()
{
struct student stu[9];
int i,N,temp;
scanf("%d",&N);
for(i=0;i<N;i++)
scanf("%d%d%d%s",&stu[i].length,&stu[i].width,&stu[i].high,stu[i].name);
for(i=0;i<N;i++)
{
if(stu[i].volume>stu[i+1].volume)
{
temp=stu[i].volume;
stu[i].volume=stu[i+1].volume;
stu[i+1].volume=temp;
}
}
printf("%s took clay from %s\n",stu[N-1].name,stu[0].name);
return 0;
}
相关分类