sams_sleuth_project/sam.bas

35 lines
954 B
QBasic
Raw Normal View History

2023-08-10 18:44:20 +00:00
10 INPUT "WHAT IS YOUR NAME? "; NM$
30 INPUT "WHAT IS THE DATE? "; SD$
35 INPUT "WHAT IS THE STARTING BALANCE? "; SB
2023-08-07 14:44:59 +00:00
40 LET CB = SB
2023-08-10 18:44:20 +00:00
41 PRINT "CHOOSE ONE AND PRESS RETURN"
2023-08-07 14:44:59 +00:00
45 PRINT ""
50 PRINT " C WRITE CHECK"
60 PRINT " D MAKE DEPOSIT"
2023-08-10 18:44:20 +00:00
70 PRINT " B CHECK BALANCE"
90 PRINT " Q QUIT"
2023-08-07 14:44:59 +00:00
100 INPUT MC$
2023-08-10 18:44:20 +00:00
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
2023-08-07 14:44:59 +00:00
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"
2023-08-10 18:44:20 +00:00
1070 PRINT "WRITE THIS CHECK!"
2023-08-07 14:44:59 +00:00
1080 PRINT CHR#(7)
1090 GOTO 45
2023-08-10 18:44:20 +00:00
2000 PRINT "YOUR CURRENT BALANCE IS, $ "; CB
2023-08-07 14:44:59 +00:00
2010 GOTO 45
2023-08-10 18:44:20 +00:00
3000 INPUT "WHAT IS THE DATE? "; DD$
3010 INPUT "HOW MUCH MONEY DO YOU WANT TO DEPOSIT "; DA
3020 LET CB=CB+DA
2023-08-07 14:44:59 +00:00
3030 GOTO 45
9999 END