Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This is in Python, you have to translate it into java yourself. I don't wanna spoil Ms Engels course for you lolol (Its also good to learn multiple languages. Makes you a better programmer if you can think from multiple perspectives. I would recommend reimplementing your assignments in other languages such as Python, C, etc)
- # money = [cents, nickels, dimes, quarters] (You dont have to use an array but I am so yeah deal with it :P)
- from math import floor
- money[3] = floor(cents/25)
- cents %= 25
- money[2] = floor(cents/10)
- cents %= 10
- money[1] = floor(cents/5)
- cents %= 5
- money[0] = cents
- print(money)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement