public static void Main()
int numTipoProductos = 5;
int[][] productos = new int[][] {
new int[]{0,2,3,4,1,2,3,4,1},
new int[]{2,2,2,2,1,0,0},
int[] totalProductosPorTipo = new int[numTipoProductos];
int[] totalDeProductosPorMes = new int[productos.Length];
for(int mesIdx=0; mesIdx < productos.Length; mesIdx++){
int[] mes = productos[mesIdx];
totalDeProductosPorMes[mesIdx] = mes.Length;
for (int productoIdx=0; productoIdx < mes.Length; productoIdx++){
int producto = mes[productoIdx];
totalProductosPorTipo[producto]++;
float promedioDe2 = (float)totalProductosPorTipo[2] / (float)productos.Length;
Console.WriteLine("Promedio del producto 2 es {0}", promedioDe2);
for (int i = 0; i < totalDeProductosPorMes.Length; i++) {
Console.WriteLine("Mes {0} tam {1}", i, totalDeProductosPorMes[i]);
for (int i = 0; i < totalProductosPorTipo.Length; i++) {
Console.WriteLine("El elemento {0} tiene {1}", i, totalProductosPorTipo[i]);