example

by stosb (no login)

'Assume you have a plane with 20 rows of seats, and each row has 2 seats. Each passenger is represented as a number.

DIM SEAT(20, 2) AS INTEGER
PRINT "Assign seats to passenger IDs"
PRINT
DO
INPUT "Row # (1-20): ", ROWNUM
INPUT "Seat # (1-2): ", SEATNUM
INPUT "Passenger ID #: ", SEAT(ROWNUM, SEATNUM)
PRINT
PRINT "Another? (y/n)"
DO
A$ = UCASE$(INKEY$)
LOOP UNTIL A$ = "Y" OR A$ = "N"
PRINT
LOOP UNTIL A$ = "N"
CLS
FOR R = 1 TO 20
FOR S = 1 TO 2
PRINT SEAT(R, S),
NEXT S
PRINT
NEXT R

Posted on May 19, 2012, 12:35 PM

Respond to this message   

Return to Index


Response TitleAuthor and Date
Re:ExampleMATT on May 19