Assume that price is an integer variable whose value is the price (in US currency) in cents of an item. Assuming the item is paid for with a minimum amount of change and just single dollars, write an expression for the amount of change (in cents) that would have to be paid.

Respuesta :

Answer:

[tex]Change = (Paid*100) - Price[/tex]

Step-by-step explanation:

First of all we need to know the relation between 1 dollar and 1 cent in order to express everything in the units required in the question.

We know that [tex]1 dollar = 100 cents[/tex], so the amount paid for the item with single dollars has to be multiplied by 100 to express its value in cents.

[tex]Paid_{cents}=Paid_{dollars}*100[/tex]

Now that we have everything in cents, we can make the subtraction:

[tex]Change_{cents} = Paid_{cents} -Price_{cents}[/tex]

Replacing the value in cents we get:

[tex]Change = (Paid*100) - Price[/tex]