ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
882 B

  1. 2 PRINT TAB(30);"INTEREST"
  2. 4 PRINT
  3. 8 PRINT
  4. 9 PA=0
  5. 10 REM -PROGRAM TO COMPUTE INTEREST PAYMENTS
  6. 20 PRINT "INTEREST IN PERCENT";
  7. 25 INPUT J
  8. 26 J=J/100
  9. 30 PRINT "AMOUNT OF LOAN";
  10. 35 INPUT A
  11. 40 PRINT "NUMBER OF YEARS";
  12. 45 INPUT N
  13. 50 PRINT "NUMBER OF PAYMENTS PER YEAR";
  14. 55 INPUT M
  15. 60 N=N*M
  16. 65 I=J/M
  17. 70 B=1+I
  18. 75 R=A*I/(1-1/B^N)
  19. 78 PRINT
  20. 80 PRINT "AMOUNT PER PAYMENT=";INT(R*100)/100
  21. 85 PRINT "TOTAL INTEREST =";INT((R*N-A)*100)/100
  22. 90 B=A
  23. 95 PRINT "PAYMENT NO.";TAB(15);"INTEREST";TAB(30);"PRINCIPAL";TAB(45);"BALANCE"
  24. 100 L=B*I
  25. 110 P=R-L
  26. 120 B=B-P
  27. 122 L=INT(L*100)/100
  28. 124 P=INT(P*100)/100
  29. 126 B=INT(B*100)/100
  30. 128 PA=PA+1
  31. 130 PRINT PA;TAB(15);"$";L;TAB(30);"$";P;TAB(45);"$";B
  32. 140 IF B>=R THEN 100
  33. 150 PRINT TAB(30);"$";INT((B*1)*100)/100;TAB(45);"$";INT((R-B*I)*100)/100
  34. 155 PRINT
  35. 160 PRINT PA+1;"LAST PAYMENT =";TAB(30);"$";INT((B*I+B)*100)/100
  36. 170 PRINT
  37. 180 PRINT
  38. 190 PRINT
  39. 200 END