Create the logic for a program that continuously prompts the user for a number of dollars until the user enters 0. Pass each entered amount to a conversion method that displays a breakdown of the passed amount into the fewest bill; in other words, the method calculates the number of 20s, 10s, 5s, and 1s needed.

2 answers

get number n

twenties = int(n/20)
n=n-20*twenties

tens = int(n/10)
n=n-10*tens

fives = int(n/5)
n=n-5*fives

ones = n
flkdfjxfklbdjgsz;dfkjsd'fgzirugzdflkjfblkfjvFLkbjd'g
f'dpfjdfgoljc
X
fdfljf

dvdz'gk d
f
dgidf
g
f