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>//1547 void main() { int a[9],b[9],c[9],e[9],f,g; int time=0,p; char d[9][9]; while(time!=-1) { cin>>time; for(int i=0;i<time;i++) { cin>>a[i]>>b[i]>>c[i]>>d[i]; e[i]=(a[i]+b[i]+c[i])/3; } p=0; for(i=0;i<time;i++) p+=e[i]; p/=time; for(i=0;i<time;i++) { if(e[i]>p) f=i; if(e[i]<p) g=i; } cout<<d[f]<<" took clay from "<<d[g]<<"."<<endl; } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator