Babbage problem: Difference between revisions

Content added Content deleted
(Added APL)
No edit summary
Line 214: Line 214:
{{out}}
{{out}}
<pre>25264</pre>
<pre>25264</pre>
=={{header|Pyhton}}==
<lang python># Lines that start by # are a comments:
# they will be ingnored by the machine


n=0 # n is a varible and its value is 0

# we will increase its value by one untill
# its square ends in 269,696

while n**2%1000000!=269696:

# n**2 -> n squared
# % -> 'modulo' or remainer after division
# != -> not equal to
n=n+1 # increase n by 1

print(n) # prints n </lang>
{{out}}
<pre>25264</pre>
=={{header|REXX}}==
=={{header|REXX}}==
If this were a computer program to be shown to a computer programming novice &nbsp; (albeit a very
If this were a computer program to be shown to a computer programming novice &nbsp; (albeit a very