Babbage problem: Difference between revisions
m
BBC BASIC: deleted a couple of superfluous comments
m (→{{header|REXX}}: corrected a typo, optimized a couple of versions (to just use even numbers).) |
m (BBC BASIC: deleted a couple of superfluous comments) |
||
Line 28:
REM So we are looking for a value of n that satisfies the condition 'n squared modulo 1,000,000 = 269,696', or 'n^2 MOD 1000000 = 269696' in the notation that the machine can accept.
LET n = 0
Line 37 ⟶ 35:
UNTIL n^2 MOD 1000000 = 269696
PRINT "The smallest number whose square ends in 269696 is" n▼
▲PRINT "The smallest number whose square ends in 269696 is" n
PRINT "Its square is" n^2</lang>
{{out}}
|