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

  Apply yen''s algorithm to find the shortest path from node 1

Apply Yen's alogithm to find the shortest paqth from node 1 to all

  Algorithms for finding possible winers-analysing complexity

Create algorithms for finding the possible winers and the Condorcet winner with analysing its complexity.

  Explaining parse tree n-m nodes

W has derivation of m steps, show that w has a parse tree n+m nodes.

  Business reprocess engineering-strategic information system

Some people may say that Business Reprocess Engineering (BPR) is special case of strategic information system, whereas, others may say opposite is true. Describe this statement in scholarly detail.

  Find the gradient magnitude and gradient direction

Consider the sub-image shown above. Find the gradient magnitude and gradient direction at the center entry using the following operators.

  Function prototypes lack parameters

These function prototypes lack parameters; add whatever parameters you feel are necessary so that the program works without global variables. The program's output should reflect the bus's actions by reporting each change in state, along with the n..

  Explain business scenario and specify types of constraints

Explain a business scenario and specify the types of constraints that would be appropriate to make sure the integrity of the database. For example, an airline reservation system should not make a reservation.

  Verify local police department-s findings on current case

Your computer investigation firm has been hired to verify local police department's findings on current case. Tension over the case is running high in the city.

  Add the form which includes richtextbox control

Add the form which includes RichTextBox control and several predefined template letters. This part of program would be used to write letters to your customers.

  Processor do when it receives an interrupt request

What does the processor do when it receives an interrupt request from an external device? Describe the sequence of events and the signals activated.

  How success or failure of restoration effort is estimated

Expalin why and how is success or failure of restoration effort estimated? Write down some significant considerations in creating monitoring plan to estimate restoration effort?

  Design circuit buffer last-in first-out lifo

I want design circuit this Buffer(LIFO). This blocking is for FIFO memory but i want design circuit Buffer Last-in First-out LIFO 4*4

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