Calculate how much home you can afford, based on several factors.
Content
Source Code
10 CLS
20 GO SUB 100
30 IF a$="A" THEN GO TO 50
35 IF a$="B" THEN GO TO 70
40 IF a$="C" THEN GO TO 90
45 PRINT "Error. try again?": GO TO 20
50 CLS : GO SUB 500
60 GO TO 95
70 CLS : GO SUB 600
80 GO TO 95
90 CLS : GO SUB 700
95 INPUT x$: GO TO 10
100 REM
110 PRINT "Option A--Given cost of new home"
120 PRINT "Calculate monthly payments."
122 PRINT
125 PRINT TAB 12;"Or"
126 PRINT
130 PRINT "Opition B--Given desired monthly payments"
140 PRINT TAB 0;"calculate maxium price of new home"
142 PRINT
145 PRINT TAB 12;"Or"
146 PRINT
150 PRINT "Option C--Given income,calculate the maxium cost of a new home and the monthly payments."
180 PRINT : PRINT : INPUT "enter option A,B,C";a$
200 REM inputs
210 INPUT "Sale price of old home $";so
220 INPUT "Balance on old mortgage $ ";om
230 INPUT "Balance on second mortgage $";os
240 INPUT "Expenses for moving and improvements $ ";me
250 LET dp=so-om-os-me
260 PRINT : PRINT "Down payment available $ ";dp
270 RETURN
300 REM income
310 INPUT "Gross annual income $ ";ai
320 LET fr=ai*.2/12
330 RETURN
400 REM
410 IF mp<=fr THEN GO TO 430
420 PRINT "Purchase not recommended"
425 PRINT "($";mp-fr;" Short on monthly payments)": RETURN
430 PRINT "Purchase recommended"
440 IF dp>=.15*cn THEN GO TO 460
450 PRINT TAB 5;"By VA or FHA": RETURN
460 PRINT TAB 5;"By Conventioal loan": RETURN
500 REM
510 CLS : GO SUB 200
515 INPUT "price of new home $ ";cn
520 LET mp=8.2*(cn-dp)/1000
530 PRINT "Monthly paymens is $ ";mp
540 PRINT : GO SUB 300
600 REM
610 CLS : GO SUB 200
615 INPUT "Desired monthly payments $ ";mp
620 LET cn=1000/8.2*mp+dp
630 PRINT : PRINT "Maxium cost of new home $ ";cn
640 GO SUB 300
650 PRINT "Funds available for monthly pay ments $ ";fr
660 PRINT : GO SUB 400
670 RETURN
700 REM
710 CLS : GO SUB 300
720 LET mp=fr: PRINT : GO SUB 200
730 LET cn=1000/8.2*mp+dp
740 PRINT "Maxium cost of new home $ ";cn
750 PRINT : GO SUB 400
800 SAVE "mortgage" LINE 100
810 STOP