Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear
- //capturar numero
- numero=input("Introduce el numero: ")
- tope = numero - 1
- suma = 0
- for k = 1:tope
- if(pmodulo(numero,k) == 0) then
- suma = suma + k
- end
- end
- if (suma == numero) then
- disp("Es un numero perfecto")
- else
- disp("NO ES NUMERO PERFECTO")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement