Ejercicios de algoritmos

Page 18

Apuntes de Informática

(5) (7) (8) (4) (5) (6) (7) (8) (9)

¿A>M?NO I=I-1=2-1=1 ¿I=0?NO Leer A, A=7 ¿A>M?SI M=A=7 I=I-1=1-1=0 ¿I=0?SI Escribir M, es decir 7

22. Inicio

Leer N

S=0

D=1

SI

N MOD D=0

NO

S=S+D

D=D+1

D<N

SI

NO NO

S=N

Escribir

Escribir

N no es perfecto

N es perfecto

Fin

18

SI


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.