MediaWiki:Sitenotice:
2024-03-02: The wiki ran out of disk space, so things were not working. This has been resolved by adding another 5GB of quota ;-) Thanks to Tim Lindner for reporting the issues. 2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)

MORTGAGE

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
100 CLS: PRINT@6,"MORTGAGE CALCULATOR"
110 PRINT@64,"SELECT ONE OF THE FOLLOWING:"
120 PRINT@96,"1. GIVEN MONTHLY PAYMENT,"
130 PRINT@131,"INTEREST RATE, AND YEARS,"
140 PRINT@163,"FIND PRINCIPAL"
150 PRINT@224,"2. GIVEN PRINCIPAL, INTEREST,"
160 PRINT@259,"AND YEARS, FIND MONTHLY"
170 PRINT@291,"PAYMENT"
180 PRINT@352,"WHICH ONE";: INPUT A$
190 IF A$="1" THEN 210
200 IF A$="2" THEN 350
210 PRINT@448,"INVALID SELECTION--TRY AGAIN"
220 FOR T=1 TO 300: NEXT T: GOTO100
230 REM - COMPUTE PRINCIPAL
240 CLS: PRINT@9,"FIND PRINCIPAL"
230 PRINT@64,"ENTER MONTHLY PAYMENT";: INPUT R$
260 IF (VAL(R$)>0) AND (VAL(R$)<10000) THEN R=VAL(R$): GOTO280
270 PRINT@87,": GOTO250
280 GOSUB470
290 P=R*(((1+(I/12))^(Y*12)-1)/((I/12)*((1+(I/12))^(Y*12))))
300 P=INT(P*100): P$=STR$(P): L=LEN(P$)
310 PRINT@193,"PRINCIPAL="+LEFT$(P$,L-2)+"."+RIGHT$(P$,2)
320 GOSUB330
330 IF A$="R" THEN 100
340 GOTO230
330 REM - COMPUTE MONTHLY PAYMENT
360 CLS: PRINT@6,"FIND MONTHLY PAYMENT"
370 PRINT@64,"ENTER PRINCIPAL";: INPUT P$
380 IF (VAL(P$)>0) AND (VAL(P$)<10000000) THEN P=VAL(P$): GOTO400
390 PRINT@80,"": GOTO370
400 GOSUB470
410 R=P*(((I/12)*((1+(I/12))^(Y*12)))/((1+(I/12))^(Y*12)-1))
420 R=INT(R*100): R$=STR$(R): L=LEN(R$)
430 PRINT@193,"MONTHLY PAYMENT="+LEFT$(R$,L-2)+"."+RIGHT$(R$,2)
440 GOSUB330
430 IF A$="R" THEN 100
460 GOTO350
470 PRINT@97,"INTEREST RATE (% /YR)";: INPUT I$
480 IF (VAL(I$)>0) AND (VAL(I$)<91) THEN I=VAL(I$)/100: GOTO510
490 PRINT@117,"": GOTO470
510 PRINT@129,"NUMBER OF YEARS";: INPUT Y$
520 IF (VAL(Y$)>0) AND (VAL(Y$)<100) THEN Y=VAL(Y$): GOTO540
530 PRINT@146,"": GOTO310
540 RETURN
530 PRINT@416,"ENTER R FOR RESTART, OR JUST"
560 PRINT@448,"<ENTER> FOR SAME";: INPUT A$
570 IF NOT (A$="R" OR A$="") THEN PRINT@465,"": GOTO550
580 RETURN