Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running Totals
#1
I am sending you a program which I have started to constuct. It is for
recording by Bike Training on
I cannot seem to make a Running Total of the Kilometers Rided Can you help
me

CLS
OPEN "Record.rec" FOR APPEND AS #1
CLS
PRINT "Cycling Record"
PRINT "type END to quit"
PRINT

DO WHILE (day$ <> "END")
INPUT "Date ", day$
IF (day$ <> "END") THEN
INPUT "Kilometres ", Kms
INPUT "Minutes", min
Speed = Kms / (min / 60)
WRITE #1, day$, Kms, min, Speed
END IF
PRINT
LOOP
CLOSE #1
INPUT "Press Enter to see the Total Record", dummy
CLS
OPEN "Record.rec" FOR INPUT AS #1
PRINT "Date Kms Mins Av.Speed "
PRINT "---------------------------------"

tmp$ = "\ \ ### ### ####.# "

DO WHILE (NOT EOF(1))
INPUT #1, day$, Kms, min, Speed
PRINT USING tmp$; day$; Kms; min; Speed
LOOP
CLOSE #1
Reply


Messages In This Thread
Running Totals - by ElderQB - 09-05-2003, 06:06 PM
Running Totals - by Neo - 09-05-2003, 07:04 PM
Running Totals - by Antoni Gual - 09-06-2003, 01:01 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)