sams_sleuth_project/sam.bas
2023-08-10 14:44:20 -04:00

35 lines
954 B
QBasic

10 INPUT "WHAT IS YOUR NAME? "; NM$
30 INPUT "WHAT IS THE DATE? "; SD$
35 INPUT "WHAT IS THE STARTING BALANCE? "; SB
40 LET CB = SB
41 PRINT "CHOOSE ONE AND PRESS RETURN"
45 PRINT ""
50 PRINT " C WRITE CHECK"
60 PRINT " D MAKE DEPOSIT"
70 PRINT " B CHECK BALANCE"
90 PRINT " Q QUIT"
100 INPUT MC$
110 IF MC$ = "C" THEN GOTO 1000
120 IF MC$ = "D" THEN GOTO 3000
140 IF MC$ = "B" THEN GOTO 2000
150 IF MC$ = "Q" THEN GOTO 9999
1000 INPUT "WHAT IS THE DATE "; DC$
1010 INPUT "WHO ARE YOU WRITING THE CHECK TO "; PC$
1020 INPUT "HOW MUCH IS THE CHCCK FOR "; CA
1021 IF CA > CB THEN GOTO 1045
1030 LET CB = CB - CA
1040 GOTO 45
1045 PRINT
1050 PRINT "YOU DO NOT HAVE"
1060 PRINT "ENOUGH MONEY TO"
1070 PRINT "WRITE THIS CHECK!"
1080 PRINT CHR#(7)
1090 GOTO 45
2000 PRINT "YOUR CURRENT BALANCE IS, $ "; CB
2010 GOTO 45
3000 INPUT "WHAT IS THE DATE? "; DD$
3010 INPUT "HOW MUCH MONEY DO YOU WANT TO DEPOSIT "; DA
3020 LET CB=CB+DA
3030 GOTO 45
9999 END