Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
412 B
0
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
	int mas[5][5];
	double	sr[5] = {};
	for (int i = 0; i < 5; i++) {
		for (int y = 0; y < 5; y++) {
			cin >> mas[i][y];
		}
	}
	int sum = 0; //
	for (int i = 0; i < 5; i++) {
		sum = 0;
		for (int y = 0; y < 5; y++) {	 
			sum += mas[i][y];		
		}
		sr[i] =(double) sum / 5;
	}
	for (int i = 0; i < 5; i++) {
		cout << sr[i]<<" ";
	}
}
Leave a Comment