#include "stdio.h"
main()
{int score;
float sum=0,ave;
int n=0;
while(1) /*循环条件总为真,用有条件的break语句结束循环*/
{scanf("%d",&score);
if(score==-1)
break;
sum=sum+score;
n++;
}
ave=sum/n;
printf("平均成绩=%f\n",ave);
}
int n = 0,sum = 0;
float avg = 0.0;
while(1)
{ scanf("%d",&score);
if(score==-1) break;
sum+=score;
n++;}
avg = sum * 1.0 / n;