Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
482 B
1
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
	int dn[5][5];
	int mas[5]{};
	short int a;
	short int b;
	for (int i = 0; i < 5; i++){
		for (int j = 0; j < 5; j++){
			cin >> dn[i][j];
			if (dn[i][j] == 3)
			{
				a = i; b = j;
			}
			mas[i] += dn[i][j];
		}
	}
	cout << (double)mas[0] / 5 << " " << (double)mas[1] / 5 << " " << (double)mas[2] / 5 << " " << (double)mas[3] / 5 << " " << (double)mas[4] / 5 << endl << a + 1<< " " << b + 1;
	return 0;
}
Leave a Comment