Jump to content

Jensen's Device: Difference between revisions

Added Asymptote
(Grouping BASIC dialects)
(Added Asymptote)
Line 260:
 
</syntaxhighlight>
 
=={{header|Arturo}}==
{{trans|Ruby}}
Line 269 ⟶ 270:
]
print ["harmonicSum 1->100:" harmonicSum 'i 1 100 {1.0 / i}]</syntaxhighlight>
 
{{out}}
 
<pre>harmonicSum 1->100: 5.187377517639621</pre>
 
=={{header|Asymptote}}==
{{trans|FreeBASIC}}
<syntaxhighlight lang="Asymptote">real temp = 0;
for(int i = 1; i <= 100; ++i) {
temp += 1/i;
}
write(temp);</syntaxhighlight>
{{out}}
<pre>5.18737751763962</pre>
 
=={{header|AWK}}==
2,167

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.