- 谁拿了最多奖学金
- 2009-02-03 20:50:17 @
#include
#define max 100
int main()
{
int i,k,n,big,sumn;
char x[max],y[max],name[max][20];
int goala[max],goalb[max],num[max],sum[max];
while((scanf("%d",&i))!=EOF)
{
big=0;
for(k=1;k=1)sum[k]+=8000;
if(goala[k]>85&&goalb[k]>80)sum[k]+=4000;
if(goala[k]>90)sum[k]+=2000;
if(goala[k]>85&&y[k]=='Y')sum[k]+=1000;
if(goalb[k]>80&&x[k]=='Y')sum[k]+=850;
sumn=sumn+sum[k];
if(big==0)
big=k;
else if(sum[k]>sum[big])big=k;
}
printf("%s\n",name[big]);
printf("%d\n",sum[big]);
printf("%d",sumn);
}
return 0;
}
1 条评论
-
plokzfadai LV 8 @ 2009-10-02 10:49:28
哈哦
名字的数组要开21位,存最后一个'\0'。
- 1