20091211

PRACTICA 11. 1 VALOR MAXIMO ARREGLO BIDIMENSIONAL


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

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int posc = 0, posr = 0;
int mayor = 0;
int c, r;
int[,] numeros = { { 16, 22, 99, 4, 18 }, { -258, 4, 101, 5, 98 }, { 105, 6, 15, 2, 45, }, { 33, 88, 72, 16, 3 } };
for (r=0;r<3;r++) c =" 0;"> mayor)
{
mayor = numeros[r, c];
posc = c + 1;
posr = r + 1;

}
else
{
}
Console.WriteLine("la matriz conformado por {0}", numeros[r, c]);

}}
Console.WriteLine("el numero mayor es {0}",mayor);
Console.WriteLine("en el renglon {0}",posr);

Console.WriteLine("en la columna {0}",posc);
Console.ReadKey();
}
}
}

No hay comentarios:

Publicar un comentario