' GETNAMES.BAS
' This program reads string information into an array.

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

DIM salesGroup$(PERSONS%)    ' dimension salesGroup$ string array

CLS

FOR i% = 1 TO PERSONS%       ' use i% to access array elements
    INPUT "Enter salesperson name:  ", salesGroup$(i%)
NEXT i%

PRINT
PRINT "You entered the following names:"
PRINT

FOR i% = 1 TO PERSONS%       ' print entire contents of array
    PRINT salesGroup$(i%)
NEXT i%


