Babbage problem: Difference between revisions
Content added Content deleted
(added an image of Charles Babbage's analytical engine to the task's preamble.) |
(→{{header|Ruby}}: Added Ruby) |
||
Line 228: | Line 228: | ||
The smallest integer whose square ends in 269,696 is: 25264 |
The smallest integer whose square ends in 269,696 is: 25264 |
||
</pre> |
</pre> |
||
=={{header|Ruby}}== |
|||
<lang ruby>n = 0 |
|||
n = n + 2 until (n*n).modulo(1000000) == 269696 |
|||
puts n |
|||
</lang> |
|||
=={{header|x86 Assembly}}== |
=={{header|x86 Assembly}}== |