SHARE
TWEET

Untitled

a guest May 9th, 2015 385 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 10 PRINT "This program will calculate compound intrest."
  2. 20 INPUT "Input the principal amount.  "; P
  3. 30 INPUT "Input the percent of intrest in decimal form.  "; R
  4. 40 INPUT "Is the intrest compounded annually or daily?  "; Q$
  5. 50 IF Q$ = "annually" THEN GOTO 180
  6. 60 IF Q$ = "daily" THEN GOTO 90
  7. 70 PRINT "You typed something other than annually or daily.  You may have misspelled the word.  Try again."
  8. 80 GOTO 40
  9. 90 INPUT "How many times is the intrest compounded daily?  "; N
  10. 100 INPUT "How many days is the intrest compounded for?  "; T
  11. 110 LET B = R/N
  12. 120 LET C = N*T
  13. 130 LET INT = (P*(1+B)^C)-P
  14. 140 LET TOT = P*(1+B)^C
  15. 150 PRINT "The amount of intrest is ";INT; "."
  16. 160 PRINT "The total amount is ";TOT; "."
  17. 170 END
  18. 180 INPUT "How many times is the intrest compounded annually?  "; N
  19. 190 INPUT "How many years is the intrest compounded for?  "; T
  20. 200 LET B = R/N
  21. 210 LET C = N*T
  22. 220 LET INT = (P*(1+B)^C)-P
  23. 230 LET TOT = P*(1+B)^C
  24. 240 PRINT "The amount of intrest is ";INT; "."
  25. 250 PRINT "The total amount is ";TOT; "."
  26. 260 END
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top