Някой може ли да даде насоки за тази задача.
Write a program that determines the least amount of coins needed for a cashier to return change.
For example, if the price of something is 0.76 leva and the customer has paid 1 leva, the least amount of coins is
1 x 20 stotinki and
2 x 2 stotinki .
Use the coins of 1 lev, 50, 20, 10, 5, 2 and 1 stotinki.
- On the first line, you will receive the price in leva.
- On the second line, you will receive how much the customer has paid in leva.
- There is a variable amount of output lines.
- Print each required denomination on a new line, ordered from highest to lowest.
1 x 20 stotinki 2 x 2 stotinki
3 x 1 lev 1 x 5 stotinki 1 x 2 stotinki 1 x 1 stotinka