Post Reply 
Programming Exercise (HP-15C, 15C LE - and others)
03-31-2014, 08:27 PM
Post: #73
RE: Programming Exercise (HP-15C, 15C LE - and others)
A very unremarkable version for my Tandy PC-3 (AKA Sharp PC-1251), which uses BASIC:

Code:
10 "L":AREAD C
20 X=0
30 FOR I=C TO 1 STEP -1
40 X=X+(1/I)*((-1)^(I+1))
50 NEXT I
60 PRINT X
70 END

Switch to RUN mode, enter the number of iterations, and press DEF L to start. I get 100 loops in about 32 seconds, so 10000 would take around 54 minutes. Not an especially fast machine.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming Exercise (HP-15C, 15C LE - and others) - Dave Britten - 03-31-2014 08:27 PM



User(s) browsing this thread: 10 Guest(s)