Algorithme Nombre_Parfait { variable n, somme, i, j : entier Afficher("Cet algorithme calcule tous les nombres parfaits entre 1 et un nombre saisi.\n") Afficher("Veuillez saisir l'entier : ") Saisir(n) Pour j de 1 à n { somme <-- 1 Pour i de 2 à PartieEntiere(j/2)+1 par pas de 1 { Si (j mod i = 0) alors { somme <-- somme + i } } Si (j = somme) alors { Afficher(j," est parfait !\n") } } }