Anda di halaman 1dari 2

Prorating Interest

Setup Variables

interest d 0.08;
0.08 (1.1)
cash d 10;
10 (1.2)
checkouttotal d x;
x (1.3)
Digits d 10;
10 (1.4)

First equation

checkouttotal d cash, interest / cash $ 1.0 C interest ;


cash, interest /cash 1.0 Cinterest (1.5)

floor x$100
centsRounded d x/evalf ;
100
1
x/evalf floor 100 x (1.6)
100

Example 1
Assume the written problem. $10 with 8 percent tax. What is your checkout total. If get $10 of items?

checkouttotal 10, 0.08 ;


10.80 (1.1.1)

Problem 2
Solve the written question. Need to stay under $10. What is the answer?

solve 10.00 = checkouttotal x, 0.08 ;


9.259259259 (1.1.2)

Round it to dollars and cents.


centsRounded % ;
9.250000000 (1.1.3)

Answer: Stay under $9.25


Question: How to calculate this directly?

solve checkouttotal buyThis, salesTax = maxSpending, buyThis ;


maxSpending
(1.1.4)
1. CsalesTax

maxSpending
anAnswer d maxSpending, salesTax / ;
1 CsalesTax
maxSpending
maxSpending, salesTax / (1.1.5)
1 CsalesTax

anAnswer 10, 0.08 ;


9.259259259 (1.1.6)

Anda mungkin juga menyukai