#include<iostream>
using namespace std;
const int SIZE=10;
int main()
{
	int str[SIZE];
	int sum=0;
	cout<<"请输入"<<SIZE<<"个int型整数: "<<endl;
	for(int i=0;i<SIZE;i++)
	{
		cout<<"请输入第"<<i+1<<"个数据:";
		while(!(cin>>str[i]))
		{
			cin.clear();
			cin.ignore(100,'\n');
			cout<<"请输入一个合法的值";
		}
	    sum+=str[i];
	}
	cout<<"数之和为:"<<sum<<endl;
	cout<<"平均值为:"<<(float)sum/SIZE<<endl;
	


	return 0;
}