martes, 27 de abril de 2010

PRACTICA 10 PROBLEMA 1

CONSOLA



VISUAL






PSEUDOCÓDIGO



Inicio
Resistencia [5] = {16, 27, 39, 56, 81} int
Corriente [5] double
Potencia [5] double
I= 0 int
Suma = 0.0 double
Print “Introduce valores de corrientes”
For (I = 0 to 4 step I = I + 1)
{
Print “Corriente” I+1
Read Corriente [I]
Potencia [I] = Resistencia [I] * Math.Pow(Corriente [I], 2)
Suma = Suma + Potencia [I]
}
Print “Resistencia Corriente Potencia”
For (I = 0 to 4 step I = I + 1)
{
Print Resistencia [I], “\t”, Corriente [I], “\t”, Potencia [I]
}
Print “\t\t Total = “, Suma
Fin



No hay comentarios:

Publicar un comentario