Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Harmonic-series/Chipmunk-Basic/harmonic-series.basic
Normal file
17
Task/Harmonic-series/Chipmunk-Basic/harmonic-series.basic
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
100 cls
|
||||
110 print "The first twenty harmonic numbers are:"
|
||||
120 for n = 1 to 20
|
||||
130 h = h+(1/n)
|
||||
140 print n,h
|
||||
150 next n
|
||||
160 print
|
||||
170 h = 1
|
||||
180 n = 2
|
||||
190 for i = 2 to 10
|
||||
200 while h < i
|
||||
210 h = h+(1/n)
|
||||
220 n = n+1
|
||||
230 wend
|
||||
240 print "The first harmonic number greater than ";i;"is ";h;" at position ";n-1
|
||||
250 next i
|
||||
260 end
|
||||
Loading…
Add table
Add a link
Reference in a new issue