creat a logic for a program that continuously prompts the user for a numeric number of dollars until the user enters 0. pass each entered amount to a conversion method that displays breakdown of the passed amount into the fewest bills

do your homework

start

Declarations
num dollars
dollars = inputDollarAmt()
while dollars <> 0
dollarConversion(dollars)
dollars = inputDollarAmt()
endwhile
stop

num inputDollarAmt()
Declarations
num dollars
num QUIT = 0
output “Enter a dollar amount or ”, QUIT, “ to quit”
input dollars
return dollars

void dollarConversion(num dolls)
Declarations
num twenties
num tens
num fives
num ones
twenties = dolls / 20
dolls = dolls % 20
tens = dolls / 10
dolls = dolls % 10
fives = dolls / 5
dolls = dolls % 5
ones = dolls
output “You will need: ”, twenties, “ 20s, ”, tens, “ 10s, ”,
fives, “ 5s, and ”, ones, “ 1s”
return

To create a logic for the program that prompts the user for a numeric number of dollars until the user enters 0 and then passes each entered amount to a conversion method, you can follow these steps:

1. Create a loop that will continuously prompt the user for input until the user enters 0 as the amount.
2. Inside the loop, prompt the user to enter the amount in dollars using the `input()` function.
3. Convert the user input to an integer using the `int()` function.
4. Pass the entered amount to a conversion method that will calculate the breakdown of the amount into the fewest bills.
5. Implement the conversion method to determine the number of each type of bill (e.g., $1, $5, $10, etc.) that can be used to make up the entered amount.
6. Display the breakdown of the entered amount into the fewest bills using the appropriate output method (e.g., `print()`).

Here's a Python code example that demonstrates the logic explained above:

```python
def conversion(amount):
# Define the bill denominations
bill_denominations = [100, 50, 20, 10, 5, 1]

# Calculate the breakdown of the amount into the fewest bills
bill_counts = []
for bill in bill_denominations:
count = amount // bill
amount %= bill
bill_counts.append(count)

# Display the breakdown
print("Breakdown:")
for i in range(len(bill_denominations)):
if bill_counts[i] > 0:
print(f"{bill_denominations[i]}$ bills: {bill_counts[i]}")

# Main program
while True:
entered_amount = int(input("Enter the amount in dollars (0 to exit): "))
if entered_amount == 0:
break
conversion(entered_amount)
```

Note: This code assumes that the user will enter a valid numeric number as the amount and doesn't handle any potential errors. It's a good practice to add error handling and input validation to handle unexpected user input.