Skip to content

Instantly share code, notes, and snippets.

@Mnkai
Created September 26, 2021 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mnkai/fdeb217823ec65556ef090c2eee95d4b to your computer and use it in GitHub Desktop.
Save Mnkai/fdeb217823ec65556ef090c2eee95d4b to your computer and use it in GitHub Desktop.
LBL "COMPINT"
"Loop count:"
PROMPT
STO 00
"Deposit amount "
├"per loop:"
PROMPT
STO 01
"Interest rate ("
├"e.g., 1.05):"
PROMPT
STO 02
0
STO 03
1
RCL 00
1
+
1
XEQ 78
STO 04
LBL 00
ISG 04
GTO 01
GTO 02
LBL 01
RCL 01
RCL 02
RCL 04
IP
Y↑X
*
STO+ 03
GTO 00
LBL 02
CLA
ARCL 03
AVIEW
LBL 50
"-Utility Funcs-"
RTN
LBL 78
RCL T
STO "pSaveT"
RDN
CF 99
CF 98
IP
1
X=Y?
SF 98
RDN
RCL ST Z
IP
RCL ST Z
IP
1
-
999
X<Y?
XEQ 73
RDN
X<>Y
RCL ST Z
-
X>=0?
GTO 51
ABS
SF 99
LBL 51
X<>Y
1000
/
+
FS?C 98
GTO 52
RCL ST Z
100000
/
+
LBL 52
FS?C 99
+/-
RCL "pSaveT"
X<>Y
RTN
LBL 73
RDN
"range() limited"
├" to 999: got "
ARCL ST X
AVIEW
STOP
RTN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment