Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- price = float(input())
- had_paid = int(input())
- had_paid = had_paid * 100
- price = int(price*100)
- change = had_paid - price
- count = 0
- if change >= 100:
- print(change/100 , " x 1 lev")
- change %=100
- elif change >= 50 :
- print(change/50 , "x 50 stotinki")
- change %= 50
- elif change >= 20:
- print(change / 20, "x 20 stotinki")
- change %= 20
- elif change >= 10:
- print(change / 10, "x 10 stotinki")
- change %= 10
- elif change >= 5:
- print(change / 5, "x 5 stotinki")
- change %= 5
- elif change >= 2:
- print(change / 2, "x 2 stotinki")
- change %= 2
- elif change >= 1:
- print(change / 1, "x 1 stotinki")
- change %= 1
Advertisement
Add Comment
Please, Sign In to add comment