' BIKEINFO.BAS
' This program reads information into three arrays and prints it.

CONST PERSONS% = 7           ' number of salespersons
OPTION BASE 1                ' set base of all arrays to 1

DIM salesGroup$(PERSONS%)    ' dimension salesGroup$ string array
DIM bikesSold%(PERSONS%)     ' dimension bikesSold% integer array
DIM totalSales!(PERSONS%)    ' dimension totalSales! floating-point array

CLS

FOR i% = 1 TO PERSONS%       ' get salesperson name and sales data
    INPUT "Enter salesperson name:  ", salesGroup$(i%)
    INPUT "   Bikes sold:  ", bikesSold%(i%)
    INPUT "   Total sales:  $", totalSales!(i%)
    PRINT
NEXT i%

PRINT "You entered the following sales data:"
PRINT
PRINT "Salesperson     Bikes sold     Total sales"
PRINT "------------------------------------------"
PRINT

' initialize tmp$, a formatting template for PRINT USING
tmp$ = "\               \ ###          $$####.##"

FOR i% = 1 TO PERSONS%       ' print contents of each array
    PRINT USING tmp$; salesGroup$(i%); bikesSold%(i%); totalSales!(i%)
NEXT i%

