' BANZAI.BAS
' This program uses a one-dimensional dynamic string array to store names
'   of characters from the movie "The Adventures of Buckaroo Banzai."

OPTION BASE 1               ' set array base at 1

CLS

PRINT "** This program collects character names from the film ";
PRINT "'Buckaroo Banzai' **"
PRINT
INPUT "How many names would you like to enter?  ", names%

DIM characters$(names%)     ' dimension array

PRINT                       ' fill dynamic array
FOR i% = 1 TO names%
    INPUT "  Name:  ", characters$(i%)
NEXT i%

PRINT
PRINT "You entered the following names:"
PRINT

FOR i% = 1 TO names%        ' print contents of array
    PRINT characters$(i%)
NEXT i%

