C sharp - Apoyen a porfavor a encontrar en mi matriz solo el segundo numero mayor

 
Vista:

Apoyen a porfavor a encontrar en mi matriz solo el segundo numero mayor

Publicado por luischidalee (2 intervenciones) el 17/04/2017 05:24:31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
static void Main(string[] args)
{
    Console.WriteLine("¿cuántas escuelas ha estado en su vida académica desde primaria?: ");
    string linea = Console.ReadLine();
    int esc = int.Parse(linea);
 
    int [][] Matriz;
    Matriz = new int [esc][];
 
    for(int f = 0; f < Matriz.Length; f++)
    {
      Console.WriteLine("¿Cuantos maestros tubiste en cada escuela?" + f + ":");
      linea = Console.ReadLine();
      int elementos = int.Parse(linea);
      Matriz[f] = new int[elementos];
        for (int  c = 0; c < Matriz[f].Length; c++)
        {
            Console.WriteLine("Diga el nombre de todos los maestros de todas las escuelas: ");
            linea = Console.ReadLine();
            Matriz[f][c] = int.Parse(linea);
        }
 
    }
    Console.Clear();
 
    for (int f = 0; f < Matriz.Length; f++)
    {
        for (int c = 0; c < Matriz[f].Length; c++)
        {
            Console.Write(Matriz[f][c] + " ");
        }
        Console.WriteLine();
    }
    Console.ReadLine();
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
-1
Responder