04-21-2006, 02:32 AM
Hey. I have this problem with qbasic. Here is the code I am trying to get to work:
CLS
INPUT "Commission rate ===========> ", Rate
INPUT "Week 1 sales =============> ", Week1
INPUT "Week 2 sales =============> ", Week2
INPUT "Return sales =============> ", Returns
LET Commissions = Rate * (Week1 + Week2 - Returns)
PRINT
PRINT "Earned Commission ========>"; Commission
END
After typing the Return sales in and pressing enter the program exits without displaying Commission. I've search for a solution but can find the answer to forcing the program to stay open and display "press any key to continue". Thanks.
CLS
INPUT "Commission rate ===========> ", Rate
INPUT "Week 1 sales =============> ", Week1
INPUT "Week 2 sales =============> ", Week2
INPUT "Return sales =============> ", Returns
LET Commissions = Rate * (Week1 + Week2 - Returns)
PRINT "Earned Commission ========>"; Commission
END
After typing the Return sales in and pressing enter the program exits without displaying Commission. I've search for a solution but can find the answer to forcing the program to stay open and display "press any key to continue". Thanks.