| ||||||||||
| 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 <stdio.h>
int main()
{
float score[6]={0};
while(1)
{
float sum=0;
double ave;
int i;
for(i=0;i<6;i++)
{
scanf("%f",&score[i]);
sum+=score[i];
}
if(score[0]==0&&score[1]==0&&score[2]==0&&score[3]==0&&score[4]==0&&score[5]==0)
break;
else
{
ave=sum/6;
printf("%g\n",ave);
}
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator