- 谁拿了最多奖学金
- 2009-06-04 20:37:45 @
高手帮忙看一下阿
#include
#include
int main(){
int name[50],*p,money,max_money=-1,total=0;
int N,i,x,y,z,a,b;
scanf("%d",&N);
for (i=0;i80)&&(b>0)) money+=8000;
if((x>85)&&(y>80)) money+=4000;
if(x>90) money+=2000;
if((x>85)&&(a=='Y')) money+=1000;
if((y>85)&&(z=='Y')) money+=850;
total+=money;
if(money>max_money){
p=name;
max_money=money;
}
}
printf("%s\n%d\n%d\n",p,max_money,total);
return 0;
}
2 条评论
-
什么 LV 8 @ 2009-07-15 09:21:18
z,a应该为字符型而不是整型吧
-
2009-07-15 08:53:41@
必然不能用p=name
- 1