Ver Mensaje Individual
  #9 (permalink)  
Antiguo 26/02/2002, 07:17
Avatar de Aston
Aston
 
Fecha de Ingreso: mayo-2001
Ubicación: Madrid
Mensajes: 933
Antigüedad: 23 años, 11 meses
Puntos: 0
Re: Conocer el max de una matriz

Bueno, yo también quiero hacer mi aportación.

¡ Solución en 3 líneas !!

Teniendo...

aMat(1, 0) = 140
aMat(1, 1) = 68
aMat(1, 2) = 225
aMat(1, 3) = 31
aMat(1, 4) = 175

Las 3 líneas:

For n = 0 To Ubound(aMat, 2)
If aMat(1, n) > nMax Then nMax = aMat(1, n)
Next

Y lo muestras:

Response.Write nMax ;)

Espero que sirva, un saludo a todos. :)

<a href="http://www.laventanita.net/" target="_blank">
<img src="http://www.breogan.org/images/Aston.gif" border="0" alt="La Ventanita.net - Lo imprescindible en la red"></a>