|
|
DataMuseum.dkPresents historical artifacts from the history of: MIKADOS |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about MIKADOS Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1882 (0x75a)
Notes: Mikados TextFile, Mikados_K
Names: »AFBET_RE«
└─⟦bcf7b34c7⟧ Bits:30003895/4xCOMAL2.imd 4 * COMAL - SPC/1 - Disketter til bogen
└─⟦this⟧ »AFBET_RE«
0010 // ---------------------- afbet_rente ------------------------ 0020 // 0030 PROC F(PRYDELSE,PRGÆLD,PRR,PRN) 0040 F:=PRYDELSE/PRGÆLD-PRR/(1-(1+PRR)**(-PRN)) 0050 ENDPROC F 0060 // 0065 INTEGER N 0070 CLEAR 0080 CURSOR 1,4 0090 PRINT "Programmet beregner årlig rente ved afbetalingshandeler." 0100 PRINT "--------------------------------------------------------" 0110 PRINT 0120 INPUT "Indtast kontantpris: ":KONTANTPRIS 0130 INPUT "Udbetaling: ":UDBETALING 0140 INPUT "Månedlig ydelse: ":YDELSE 0150 INPUT "Indtast det antal gange, ydelsen skal betales: ":N 0160 PRINT 0170 PRINT "--------------------------------------------------------" 0180 PRINT 0190 GÆLD:=KONTANTPRIS-UDBETALING 0200 PRINT 0210 PRINT USING "Kontantpris: ##########.##":KONTANTPRIS 0220 PRINT USING "Udbetaling: ##########.##":UDBETALING 0230 PRINT USING "Gæld(kontantpris - udbetaling): ##########.##":GÆLD 0240 PRINT USING "Månedlig ydelse: ##########.##":YDELSE 0250 PRINT "Antal månedlige indbetalinger: ";N 0260 VENSTRE:=9.999999E-06;HØJRE:=0.2 0270 FV:=F(YDELSE,GÆLD,VENSTRE,N) 0275 FH:=F(YDELSE,GÆLD,HØJRE,N) 0280 REPEAT 0290 MIDTPUNKT:=(VENSTRE+HØJRE)/2 0300 FM:=F(YDELSE,GÆLD,MIDTPUNKT,N) 0310 IF FV*FM<=0 THEN 0320 HØJRE:=MIDTPUNKT 0330 FH:=FM 0340 ELSE 0350 VENSTRE:=MIDTPUNKT 0360 FV:=FM 0370 ENDIF 0380 UNTIL HØJRE-VENSTRE<9.999999E-06 0390 RENTE_PR_MD:=(VENSTRE+HØJRE)/2 0400 RENTE_P_A:=(1+RENTE_PR_MD)**12-1 0410 PRINT USING "Rente pr. år: ###.## % ":RENTE_P_A*100 0420 PRINT "--------------------------------------------------------" :553 // ---" E071 // H950 // 0356 // NG "Rente pr. år: ###.## % 1023 // S =237 // 0130 INPUT "Indtast udbetalingen: ": UD ?616 // 0140 INPUT "Indtast den månedlige ydelse: ": YD