SEUDOCODIGO
Inicio
int rep, num,total, c = 1
int sumpar = 0
int sumimpar = 0
Print "Intreoduce cantidad de numeros"
Read rep
while (c <= rep)
int rep, num,total, c = 1
int sumpar = 0
int sumimpar = 0
Print "Intreoduce cantidad de numeros"
Read rep
while (c <= rep)
{
Print "Introduce un numero entero"
Read num if (num % 2 == 0)
{
sumpar = sumpar + num
}
if (num % 2 == 1)
{
sumimpar = sumimpar + num
}
c = c + 1 } Print (sumpar) Print (sumimpar) total = 0 if (sumpar > sumimpar)
{
total = sumpar
}
else
{
Print (sumimpar)
}
if (sumpar <>
{
total = sumpar
}
else
{
Print (sumimpar)
}
if (sumpar <>
{
total = sumimpar
}
else
{
Print (sumpar)
}
Fin
CONSOLA
No hay comentarios:
Publicar un comentario