Pandigital prime: Difference between revisions

Content added Content deleted
(→‎{{header|Wren}}: Combined the two versions into 1.)
(→‎Algol 68: Common code: Fix even number detection)
Line 26: Line 26:
IF k = 1 THEN
IF k = 1 THEN
INT last digit = a[ UPB a ];
INT last digit = a[ UPB a ];
IF last digit /= 0 AND last digit /= 2 AND last digit /= 5 THEN
IF ODD last digit AND last digit /= 5 THEN
# the number doesn't end in 2 or 5 so might be prime #
# the number doesn't end in 2 or 5 so might be prime #
INT a value := a[ 0 ];
INT a value := a[ 0 ];