Babbage problem: Difference between revisions
Content added Content deleted
Langurmonkey (talk | contribs) (added langur language example) |
No edit summary |
||
Line 1,822: | Line 1,822: | ||
|> IO.puts</syntaxhighlight> |
|> 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}} |
{{out}} |
||
<pre> |
<pre> |