- 专项训练之循环结构
 11
- @ 2023-8-3 9:54:18
 
#include<bits/stdc++.h>
using namespace std;
int main()
{
	double n=0,a=0,he=0;
	double b=0;
	
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>a;
		he=he+a;
	}
	b=1.0*he/n;
	cout<<he<<" ";
	printf("%.5f",b);
	return 0;
}11
        0 comments
  
  No comments so far...