# programming

posted by .

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

• programming -

• programming -

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

## Similar Questions

1. ### Programming

How would the flow charts and pseudocode look for this?
2. ### Programming and Design

Draw the hierarchy chart and design the logic for a program that calculates the projected cost of an automobile trip. Assume that the user's car travels 20 miles per gallon of gas. Design a program that prompts the user for a number …
3. ### programming

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; …
4. ### Programming Logic and Design: Comprehensive, 6th E

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 bills; …
5. ### programming

Pseudocode - Create the logic for a program that continuously prompts a user for a numeric value until the user enters 0. The application passes the value in turn to a method that squares the number and to a method that cubes the number. …
6. ### programming

Create the logic for a program that continuously prompts a user for a numeric value until the user enters 0. The application passes the value in turn to a method that squares the number and to a method that cubes the number. The program …
7. ### programming pseudocode

Create the logic for a program that continuously prompts a user for a numeric value until the user enters 0. The application passes the value in turn to a method that squares the number and to a method that cubes the number. The program …
8. ### program design

Create the logic for a program that continuously prompts a user for a numeric value until the user enters 0. The application passes the value in turn to a method that computes the sum of all the whole numbers from 1 up to and including …
9. ### java programming

the learner is asked to write a program using java with user input that caculate and displays, the number of months it will take the user to save an amount of money. the user must enter the
10. ### computer programming

Design the logic for a program that allows a user to enter any amount of numbers up to 10 or until a sentinal value of -1 is entered. Then the program displays the count of the numbers entered and numeric average of the numbers (not …

More Similar Questions