#2686. P315 14

P315 14

说明

P315 14


你的main函数的内容为:

int main()
{
    int x = 1;
    float avg;
int n;

cin>>n;

while (x < 20){
   avg = RunningAvg(x);
 cout<<"Average is: "<<avg<<endl;
 x= x +3;
}

   return 0;
}


输入格式

n

输出格式

每次调用后函数的返回结果。
20
Average is: 1
Average is: 2.5
Average is: 4
Average is: 5.5
Average is: 7
Average is: 8.5
Average is: 10

来源

教学题