test


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace esercizio_prova
{
class Program
{
static void Main(string[] args)
{
int righe = 2;
int colonne = 3;
int[,] matrice = new int[righe, colonne];
for(int i =0; i < righe; i++)
{
for(int j = 0; j < colonne; j++)
{
Console.WriteLine("inserisci il valori della matrice "+ i +" "+ j );
matrice[i, j] = int.Parse(Console.ReadLine());
}
}
double [] mediaColonne = new double [colonne];
double [] mediaRighe= new double [righe];
for(int k = 0; k < righe; k++)
{
for (int h = 0; h < colonne; h++)
{
mediaColonne[h] += Convert.ToDouble(matrice[k,h]) / righe;
mediaRighe[k] += Convert.ToDouble(matrice[k, h]) / colonne;

}
}
for(int f = 0; f < colonne; f++)
{
Console.WriteLine("la media delle colonne " + mediaColonne[f]);

}
for(int t = 0; t < righe; t++)
{
Console.WriteLine("la media delle righe "+ mediaRighe[t]);
}
Console.ReadLine();
}

}
}