Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 10 PRINT "This program will calculate compound intrest."
- 20 INPUT "Input the principal amount. "; P
- 30 INPUT "Input the percent of intrest in decimal form. "; R
- 40 INPUT "Is the intrest compounded annually or daily? "; Q$
- 50 IF Q$ = "annually" THEN GOTO 180
- 60 IF Q$ = "daily" THEN GOTO 90
- 70 PRINT "You typed something other than annually or daily. You may have misspelled the word. Try again."
- 80 GOTO 40
- 90 INPUT "How many times is the intrest compounded daily? "; N
- 100 INPUT "How many days is the intrest compounded for? "; T
- 110 LET B = R/N
- 120 LET C = N*T
- 130 LET INT = (P*(1+B)^C)-P
- 140 LET TOT = P*(1+B)^C
- 150 PRINT "The amount of intrest is ";INT; "."
- 160 PRINT "The total amount is ";TOT; "."
- 170 END
- 180 INPUT "How many times is the intrest compounded annually? "; N
- 190 INPUT "How many years is the intrest compounded for? "; T
- 200 LET B = R/N
- 210 LET C = N*T
- 220 LET INT = (P*(1+B)^C)-P
- 230 LET TOT = P*(1+B)^C
- 240 PRINT "The amount of intrest is ";INT; "."
- 250 PRINT "The total amount is ";TOT; "."
- 260 END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement