Harmonic series: Difference between revisions
Content added Content deleted
(add FreeBASIC) |
(add parigp) |
||
Line 855: | Line 855: | ||
Index of the first term greater than 9: 4550 |
Index of the first term greater than 9: 4550 |
||
Index of the first term greater than 10: 12367</pre> |
Index of the first term greater than 10: 12367</pre> |
||
=={{header|PARI/GP}}== |
|||
<lang parigp>h=0 |
|||
for(n=1,20,h=h+1/n;print(n," ",h)) |
|||
h=0; n=1 |
|||
for(i=1,10,while(h<i,h=h+1/n;n=n+1);print(n-1))</lang> |
|||
=={{header|Perl}}== |
=={{header|Perl}}== |