03
#include<stdio.h>
int main()
//整数求和
{
int number;
int sum=0;
int t=0;
scanf("%d",&number);
while (number!=-1)
{
sum+=number;
t++;
scanf("%d",&number);
}
printf("average is %f",1.0*sum/t);
return 0;
}
03
#include<stdio.h>
int main()
//整数求和
{
int number;
int sum=0;
int t=0;
scanf("%d",&number);
while (number!=-1)
{
sum+=number;
t++;
scanf("%d",&number);
}
printf("average is %f",1.0*sum/t);
return 0;
}