Find square difference: Difference between revisions

Content added Content deleted
(→‎OCaml: add)
(Added Forth entry)
Line 298: Line 298:
!!F(1000);</syntaxhighlight>
!!F(1000);</syntaxhighlight>
{{out}}<pre>501</pre>
{{out}}<pre>501</pre>

=={{header|Forth}}==
{{works with|gforth|0.7.3}}
{{trans|Quackery}}

<syntaxhighlight lang="Forth">: square dup * ;
: square-diff
0 begin 1+
dup square over 1- square -
1000 > until . ;

square-diff</syntaxhighlight>
{{out}}<pre>501 ok</pre>



=={{header|FreeBASIC}}==
=={{header|FreeBASIC}}==