REM Prog4.bas (your name and class time goes here) REM Program to create a Sales Report of action figures sold REM *** Main Routine GOSUB INIT.RTN GOSUB PROCESS.RTN GOSUB TOTAL.RTN GOTO EOP REM EOF is set when the last record is read PROCESS.RTN: DO WHILE NOT EOF(1) GOSUB INPUT.RTN GOSUB CALCULATE.RTN GOSUB OUTPUT.RTN LOOP RETURN INIT.RTN: REM *** Initialize Routine *** OPEN "PROG4DAT.TXT" FOR INPUT AS #1 LET Total = 0 CLS PRINT "PRG4SALE.BAS Sales Report by Juan Marquez ", DATE$ PRINT " " PRINT "Item Price Qty Cost Tax Order Amt" PRINT " " L$ = "\ \ ###.## ### ##,###.## ##,###.## ##,###.##" T$ = "TOTAL SALES ##,###.##" RETURN INPUT.RTN: REM *** Input Routine *** INPUT #1, Item$, Price, Qty RETURN CALCULATE.RTN: REM *** Processing Routine *** REM *** 5% markup if Qty <= 40 IF Qty > 40 THEN LET Cost = Price * Qty ELSE LET Cost = Price * Qty * 1.05 END IF LET Tax = Cost * .06 LET Order = Cost + Tax LET Total = Total + Order RETURN OUTPUT.RTN: REM *** Output Routine *** PRINT USING L$; Item$; Price; Qty; Cost; Tax; Order RETURN TOTAL.RTN: REM *** Print Totals *** CLOSE #1 PRINT " " PRINT USING T$; Total PRINT " " PRINT "Press Alt & Print Screen to capture the screen, and " INPUT "then press Enter to continue: ", P RETURN EOP: END