| ||||||||||
| 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 | |||||||||
呵呵,改了你的代码In Reply To:看不出来,这也错了??郁闷!哥们帮个忙!!谢谢 Posted by:ACM05001_dz0302 at 2005-07-29 02:13:16 #include <stdio.h>
int main()
{
int t,i,a,b,c,tmp;
char n[10][20];
while(scanf("%d",&t) && t>0)
{
int max = 0, min = 1000000000;
int maxi, mini;
for(i=1;i<=t;i++)
{
scanf("%d%d%d%s",&a,&b,&c,n[i]);
tmp=a*b*c;
if(tmp > max)
{
max = tmp;
maxi = i;
}
if(tmp < min)
{
min = tmp;
mini = i;
}
}
printf("%s took clay from %s.\n",n[maxi],n[mini]);
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator