| ||||||||||
| 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 | |||||||||
这道题让我学会了用%g,呵呵*^◎^*#include<cstdio>
int main()
{
while(1)
{
double T=6,t,sum=0,max=0,min=999;
while(T--)
{
scanf("%lf",&t);
sum+=t;
if(t<min)min=t;
if(t>max)max=t;
}
if(sum==0)break;
printf("%g\n",(sum-max-min)/4.0);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator