Jump to content

Babbage problem: Difference between revisions

no edit summary
(added langur language example)
No edit summary
Line 1,822:
|> IO.puts</syntaxhighlight>
 
{{out}}
<pre>
25264
</pre>
 
=={{header|EMal}}==
<syntaxhighlight lang="emal">
^|
| Since the number must end with 269696 we can safely start counting from its square root;
| we are only interested in its integer part.
| We assign a value to a variable with "←".
| The modulo symbol for getting the remainder of a division is "%".
|^
int i ← int!√269696
while i² % 1000000 ≠ 269696 do ++i end
writeLine(i)
</syntaxhighlight>
{{out}}
<pre>
226

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.