- 谁拿了最多奖学金
- 2009-10-25 22:21:43 @
谁拿了最多的奖学金(c)
大妈们,帮我看看,哪错了呀?怎么提交才是正确的呀!怎么总0分???
#include
using namespace std;
int main(){
int i,j,n,qm,py,lw,prize,maxx=0;
long total=0;
char a[20],name[20],xb,gb;
fin>>n;
for(i=1;i>a>>qm>>py>>gb>>xb>>lw;
prize=0;
if((qm>80)&&(lw>0)) prize+=8000;
if((qm>85)&&(py>80)) prize+=4000;
if(qm>90) prize+=2000;
if((qm>85)&&(xb=='Y')) prize+=1000;
if((py>80)&&(gb=='Y')) prize+=850;
total+=prize;
if(prize>maxx){
maxx=prize;
for(j=0;j
1 条评论
-
我是神01506 LV 8 @ 2013-08-28 12:48:41
把#include<fstream>改成#include<iostream>
- 1