Find square difference: Difference between revisions

Content added Content deleted
(Initial FutureBasic task solution added)
Line 336: Line 336:
print fpow(1001)</syntaxhighlight>
print fpow(1001)</syntaxhighlight>
{{out}}<pre>501</pre>
{{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}}==
=={{header|Go}}==