miércoles, 28 de abril de 2010

PRACTICA 10 PROBLEMA 2

CONSOLA




VISUAL





PSEUDOCÓDIGO
Inicio

pendientes [19] = {17.24, 25.63, 5.94, 33.92, 3.71, 31.84, 45.90, 35.99, 18.44, 6.92, 12.2, 29.45, 13.89, 5.21, 2.56, 8.77, 23.99, 7.23, 31.56} Double
max = pendientes [0] double
pmax = 0 double
min = pendientes [0] double
pmin = 0 double
i = 0 int
for (i = 1 to 19 step i = i + 1)
{
if (pendientes[i] > max)
{
max = pendientes[i]
pmax = i
}
if (pendientes[i] < min)
{
min = pendientes[i]
pmin = i
}
}
Print “PENDIENTES”
for (i = 1 to 19 step i = i + 1)
{
Print pendientes[i]
}
Print "\nPendiente mayor: ", max
Print "\nEn la posición: ", pmax
Print "\nPendiente menor: ", min
Print "\nEn la posición: ", pmin
Fin

No hay comentarios:

Publicar un comentario