Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
17
Task/Harmonic-series/MSX-Basic/harmonic-series.basic
Normal file
17
Task/Harmonic-series/MSX-Basic/harmonic-series.basic
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
100 CLS : REM HOME 100 HOME for Applesoft BASIC
|
||||
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 IF NOT(h < i) THEN GOTO 240
|
||||
210 h = h+(1/n)
|
||||
220 n = n+1
|
||||
230 GOTO 200
|
||||
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