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> int main() { int n; char x[10][8]; int a[10],b[10],c[10]; int max,min; int d; int j=0,m=0; cin>>n; while(n!=-1) { max=0; min=250; j=0; m=0; for(int i=0;i<n;i++) { cin>>a[i]>>b[i]>>c[i]>>x[i]; d=a[i]*b[i]*c[i]; if(d>max) { j=i; max=d; } if(d<min) { m=i; min=d; } } cout<<x[j]<<" took clay from "<<x[m]<<'.'<<endl; cin>>n; } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator