Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
高人指点一下,怎么提交不成功啊,谢谢#include<iostream.h> void main() { char p1[20],p2[20],type,p3;float data; float result [50];int i=0; cin>>p3; while(p3!='#'){ result[i]=0; while (p3!='0'){ cin>>p1>>p2>>data>>type; if(type=='F')result[i]+=data*2; else if(type=='B')result[i]+=data*1.5; else if (data<=500)result[i]+=500; else if (data>500)result [i]+=data; cin>>p3; } i++; cin>>p3; } for (int j=0;j<i;j++) cout<<result[j]<<endl; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator