Find square difference: Difference between revisions
Initial FutureBasic task solution added
(→{{header|Ruby}}: Add Ruby) |
(Initial FutureBasic task solution added) |
||
Line 336:
print fpow(1001)</syntaxhighlight>
{{out}}<pre>501</pre>
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
local fn fpow( n as NSUInteger ) as NSUInteger
NSUInteger i = 0
while ( i^2 - (i-1)^2 < n ) : i++ : wend
end fn = i
print fn fpow( 1001 )
HandleEvents
</syntaxhighlight>
{{output}}
<pre>
501
</pre>
=={{header|Go}}==
|