1.1-Introductie-Programmeren

Calculating change

Difficulty: Filled Filled Filled

Write a program that calculates the amount of change (and corresponding coins/bills) given a certain purchase. First you should prompt the user for the amount due and amount paid. There are no bills / coins larger than 100 euro present in the store, also the store does not have 1 or 2 cent coins. To prevent rounding errors, we’ll only use cents (integers) in this application.

Example

Example