Primes which contain only one odd digit: Difference between revisions
Content added Content deleted
(Added Algol 68) |
m (→{{header|ALGOL 68}}: trivial formatting change) |
||
Line 26: | Line 26: | ||
# 2 is the only even prime, so the final digit must be odd for primes > 2 # |
# 2 is the only even prime, so the final digit must be odd for primes > 2 # |
||
# so we only need to check that the digits other than the last are all even # |
# so we only need to check that the digits other than the last are all even # |
||
INT show max = 1 000; |
INT show max = 1 000; |
||
INT p1odd count := 0; |
INT p1odd count := 0; |
||
FOR n FROM 3 TO UPB prime DO |
FOR n FROM 3 TO UPB prime DO |