Sitenotice: 11/29/2018: The wiki is back. It turns out, some anti-virus product on my web server had an issue with the latest version of PHP. My server techs have resolved this issue, and things should be working again. During the investigation, I did restore to a backup from September. There is a chance that any changes done since then were lost, but I do not recall any edits. --OS-9 Al

8/30/2016: Massive re-work is being done on the InfoBox Templates. Read that page to keep up with the plan for that, and adding better keyword tags (categories) to all the pages. --OS-9 Al (talk) 15:28, 31 August 2016 (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