|
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: 2528 (0x9e0) Types: TextFile Notes: Mikados TextFile, Mikados_K Names: »AFBET_RE«
└─⟦4cd80c18f⟧ Bits:30003895/4xCOMAL3a.imd 4 * COMAL - SPC/1 - Disketter til bogen └─⟦this⟧ »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
C0010 // ---------------------- afbet_rente ------------------------C▶08◀0020 // ▶08◀$0030 PROC F(PRYDELSE,PRGÆLD,PRR,PRN)$/0040 F:=PRYDELSE/PRGÆLD-PRR/(1-(1+PRR)**(-PRN))/▶0e◀0050 ENDPROC F▶0e◀▶08◀0060 // ▶08◀▶0e◀0065 INTEGER N▶0e◀▶0b◀0070 CLEAR ▶0b◀▶0f◀0080 CURSOR 1,4▶0f◀E0090 PRINT "Programmet beregner årlig rente ved afbetalingshandeler."EE0100 PRINT "--------------------------------------------------------"E▶0b◀0110 PRINT ▶0b◀I0120 INPUT "Indtast kontantpris: ":KONTANTPRISIH0130 INPUT "Udbetaling: ":UDBETALINGHD0140 INPUT "Månedlig ydelse: ":YDELSED?0150 INPUT "Indtast det antal gange, ydelsen skal betales: ":N?▶0b◀0160 PRINT ▶0b◀E0170 PRINT "--------------------------------------------------------"E▶0b◀0180 PRINT ▶0b◀!0190 GÆLD:=KONTANTPRIS-UDBETALING!▶0b◀0200 PRINT ▶0b◀L0210 PRINT USING "Kontantpris: ##########.##":KONTANTPRISLK0220 PRINT USING "Udbetaling: ##########.##":UDBETALINGKE0230 PRINT USING "Gæld(kontantpris - udbetaling): ##########.##":GÆLDEG0240 PRINT USING "Månedlig ydelse: ##########.##":YDELSEG70250 PRINT "Antal månedlige indbetalinger: ";N7%0260 VENSTRE:=9.999999E-06;HØJRE:=0.2%!0270 FV:=F(YDELSE,GÆLD,VENSTRE,N)!▶1f◀0275 FH:=F(YDELSE,GÆLD,HØJRE,N)▶1f◀\f 0280 REPEAT \f !0290 MIDTPUNKT:=(VENSTRE+HØJRE)/2!#0300 FM:=F(YDELSE,GÆLD,MIDTPUNKT,N)#▶16◀0310 IF FV*FM<=0 THEN ▶16◀▶15◀0320 HØJRE:=MIDTPUNKT▶15◀▶0b◀0330 FH:=FM▶0b◀ 0340 ELSE ▶17◀0350 VENSTRE:=MIDTPUNKT▶17◀▶0b◀0360 FV:=FM▶0b◀▶0b◀0370 ENDIF ▶0b◀%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;E0420 PRINT "--------------------------------------------------------"E\f :553 // ---"\f ▶08◀E071 // ▶08◀▶08◀H950 // ▶08◀&0356 // NG "Rente pr. år: ###.## % & 1023 // S M=237 // 0130 INPUT "Indtast udbetalingen: ": UDMM?616 // 0140 INPUT "Indtast den månedlige ydelse: ": YDM▶00◀▶00◀cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc