DataMuseum.dk

Presents historical artifacts from the history of:

CP/M

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CP/M

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦21091e5c0⟧ TextFile

    Length: 896 (0x380)
    Types: TextFile
    Names: »LOBETID.BAS«

Derivation

└─⟦a2831e659⟧ Bits:30004217 MBASIC r5.21 og BASIC programmer
    └─ ⟦this⟧ »LOBETID.BAS« 

TextFile

4	PRINT
5	PRINT "==============="
10	PRINT "Et låns løbetid"
15	PRINT "==============="
20	PRINT
30	PRINT "         Fast ydelse ";
40	INPUT R
50	PRINT "           Hovedstol ";
60	INPUT P
70	PRINT "   Rentefod (% p.a.) ";
80	INPUT I
90	PRINT "Antal ydelser pr. år ";
100	INPUT N
108 REM Beregn løbetid i år ved hjælp af formlen
109 REM Rentefod omregnes til decimal
110	Y=-(LOG(1-(P*(I/100))/(N*R))/(LOG(1+I/100/N)*N))
114 REM beregn år og måneder udfra år i decimal
115	M=INT(Y*12+.5)
116	Y0=INT(M/12)
117	M=M-Y0*12
119 REM Udskriv resultat
120	PRINT "             Løbetid =";Y0;"år";
125	PRINT M;"måneder"
130	PRINT "Vil du køre programmet igen (J/N)"
140	VALG$=INKEY$
145	IF VALG$="" THEN GOTO 140
150	IF VALG$="J" THEN GOTO 20
160	IF VALG$="j" THEN GOTO 20
165	PRINT
170	CHAIN "LAAN"
«eof»