Advertisement
VergeoPaw

1018

Sep 19th, 2021
663
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. money = int(input())
  2. hundreds = (money-(money%100))/100
  3. fifties = ((money%100)-(money%100)%50)/50
  4. twenties = (((money%100)%50)-(money%100%50%20))/20
  5. tens = ((money%100%50%20) - (money%100%50%20%10))/10
  6. fives = ((money%100%50%20%10)-(money%100%50%20%10%5))/5
  7. twos = ((money%100%50%20%10%5)-(money%100%50%20%10%5%2))/2
  8. ones = ((money%100%50%20%10%5%2)-(money%100%50%20%10%5%2%1))
  9.  
  10. print(money)
  11. print("%i nota(s) de R$ 100,00"%hundreds)
  12. print("%i nota(s) de R$ 50,00"%fifties)
  13. print("%i nota(s) de R$ 20,00"%twenties)
  14. print("%i nota(s) de R$ 10,00"%tens)
  15. print("%i nota(s) de R$ 5,00"%fives)
  16. print("%i nota(s) de R$ 2,00"%twos)
  17. print("%i nota(s) de R$ 1,00"%ones)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement