InformáticaBásico1 respuestas

¿Realizar un algoritmo que lee una secuencia de 100 números y obtiene e imprime cuantos hay positivos, negativos y nulos (ceros)?

¿Realizar un algoritmo que lee una secuencia de 100 números y obtiene e imprime cuantos hay positivos, negativos y nulos (ceros)?

4C7carprFanIno

Mejor respuesta

Adrian5454

10

INICIO PROGRAMAHacer J = 0 ; POS = 0 ; NEG = 0 ; NUL = 0Mientras J ≤ 100 Leer ENT ; Si ENT > 0 ( 1 ) POS = POS + 1 # Incrementar números positivos SINO ( 1 ) Si ENT < 0 (2) NEG = NEG + 1 # Incrementar número negativo SINO (2) NUL = NUL + 1 #Incrementar números nulos FIN SINO ( 2) FIN SI (2) FIN SINO ( 1 ) FIN SI ( 1 ) J = J + 1 #Incrementar contador de MIENTRAS FIN MIENTRAS IMPRIMIR "NÚMEROS POSITIVOS LEÍDOS : ", POS IMPRIMIR "NÚMEROS NEGATIVOS LEÍDOS : ", NEG IMPRIMIR "NÚMEROS NULOS LEÍDOS : ", NUL

FIN PROGRAMA

A tu orden.