Weird numbers: Difference between revisions

Content added Content deleted
(Added Algol 68)
Line 121: Line 121:
# returns TRUE if n with divisors divs, is semiperfect, FALSE otherwise #
# returns TRUE if n with divisors divs, is semiperfect, FALSE otherwise #
PROC semiperfect = ( INT n, []INT divs, INT lb, ub )BOOL:
PROC semiperfect = ( INT n, []INT divs, INT lb, ub )BOOL:
IF ( ub - lb ) <= -1
IF ub < lb
THEN FALSE
THEN FALSE
ELIF INT h = divs[ lb ];
ELIF INT h = divs[ lb ];