Untitled
unknown
plain_text
2 years ago
482 B
6
Indexable
#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;
}Editor is loading...
Leave a Comment