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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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