Create the logic for a program

Assignment Help Basic Computer Science
Reference no: EM13165567

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; in other words, the method calculates the number of 20s, 10s, 5s, and 1s needed. While also making certain to use the function prototype above the "using" statement.

(I need the program specifically)

// Pseudocode

// Start

//     Declarations

//       num dollars

//     output "Please enter the a whole dollar amount (no cents!). Input 0 to terminate: "

//     input dollars

//     while ( dollars <> 0)

//       displayBills(dollars)

//       output "Please enter the a whole dollar amount (no cents!). Input 0 to terminate: "

//       input dollars

//     endwhile

// Stop

//

//

//

// displayBills(num dollars)

//     Declarations

//       num ones

//       num fives

//       num tens

//       num twenties

//       num temp

//     twenties = dollars / 20

//     temp = dollars % 20

//     tens = temp / 10

//     temp = temp % 10

//     fives = temp / 5

//     ones = temp % 5

//     output "The dollar amount of ", dollars, " can be represented by the following monetary denominations"    

//     output "     Twenties: ", twenties

//     output "     Tens: ", tens

//     output "     Fives: ", fives

//     output "     Ones: ", ones

// return

Reference no: EM13165567

Questions Cloud

Develop a scorecard and dashboard : Develop a scorecard and dashboard illustrating the key indicators and send the samples and a memo to the board members
State the excess acid that was not neautralized : A sample of .755g of NaHCO3 was dissolved in 25mL of .960 M HCl. After heating, 6.7 mL of .601 M NaOH was needed to neutralize the excess acid that was not neautralized
State the concentrations are for a through d : A reaction where A +B ? C +D has a ? Go' of 5 kcal/mole and the concentrations are for A through D, respectively 10 mM, 5 mM, 2 mM and 3 mM. Find the ?G' and state if favorable or not.
What is connection-oriented networking? : Networking modes: What is connection-oriented networking? How many modes can it be operated and what are they?
Create the logic for a program : 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; in other words..
Calculate the direct material and the direct labour variance : Calculate the direct material and the direct labour variances and evaluate the company's variances and determine whether or not the changes in suppliers
Write the amino acid sequence in the n-terminal : write the amino acid sequence in the N-terminal to C-terminal direction. Use the three-letter amino acid abbreviations (for example, Glu-Asp-Val).
Design a zoo using coding best practices and object oriented : Design a ZOO using coding best practices and object oriented design principles
Let''s combine everything together : Let's combine everything together! In this question, you will be asked to combine scaling and translations. Write a function named "problem5" that accepts a single input and scales the image by 0.5 and shifts it up by 7 units. The input variable h..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Assembly program to compute division of two integer numbers

Write a program in assembly with the necessary comments that computes division of two integer numbers (Y by X) by consecutively subtracting X from Y.

  Explaining binary normalization shift-and-subtract

Convert input arguments to binary. Binary normalization shift-and-subtract.

  Explain program manager for human services program

Write down 200- to 300-word email to friend describing new position and its responsibilities, incorporating all vocabulary words.

  Corporate goal for scr new training activity

We require corporate goal for SCR which refers to new training activity. Create a draft to show Jesse. Draft project scope statement for TIMS system

  Explain techniques to recover passwords from protected files

Explain techniques to apply to recover passwords from the protected files.

  Significant business opportunity of apple

Do you believe it was wise for Apple to only present their OS on their PC instead of offering the version of Apple OS for other manufactory's (HP, Dell, Sony, etc) PC's?

  Write responsibility of professionals have to society

Write responsibility do computing professionals have to society at large and to other members of profession? Do they have any responsibilities or are their working lives only measured.

  Making the row number absolute

In cell F6, create a formula to calculate the Total with Insurance. Multiply E6 by 1+ the insurance to calculate the result. Enter the insurance rate as a mixed cell reference in the formula, making the row number absolute.

  Analyze the benefits and drawbacks of the common criteria

"'Recall that criteria creep' is the process of refining evaluation requirements as the industry gains experience with them, making the evaluation criteria something of a moving target. (See Section 21.2.4.2.)

  Finding project schedule if critical path is identified

Describe in scholarly detail how you find out a project schedule once critical path has been identified.

  Retrieves a student name and three scores

Write an application that retrieves a student name and three scores per line from a text file. Process the values by calculating the average of the scores per student. Write the name and average to a different text file. Test your application with a ..

  Explain material protected under all copyright laws

All rights reserved. This material is protected under all copyright laws as they presently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from publisher.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd