Accepted
/in/foo.cc: In function 'int main()': /in/foo.cc:8:6: warning: unused variable 'Maps' [-Wunused-variable] int Maps[Maxsize][Maxsize] = { 0 }; ^~~~
代码
#include <iostream>
using namespace std;
const int Maxsize = 100;
int main(void)
{
int Maps[Maxsize][Maxsize] = { 0 };
int num, mum;
cin >> num;
cin >> mum;
float sum = 0, aver = 0;
int i, j;
for (i = 0; i < num; i++)
{
for (j = 0; j < mum; j++)
{
cin >> aver;
sum += aver;
}
}
cout << sum / (num * mum) << endl;
system("pause");
return 0;
}