ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 28 Apr 2017 My Price 9.00

Coins to use and their values

Hey, 

I guess u remember me. Looks like I messed up somewhere trying to put in the loops. If you can, please rewrite the code using loops. That would be very hepful. Thank you so much for all your help. 

Liana 

 

 

In this assignment you will design a program to give customers the correct change. Here are the parameters:
1) Coins to use and their values: Half Dollars (50) Quarter Dollars (25) Dimes (10) Nickels (5) Pennies (1) The user will enter a number between 1 and 99. If the number is outside of that range, you will inform the user
and terminate the program. 0 You will use as few coins as possible. For example, if the user enters "50", you will give the answer as "One
Half Dollar" and not "5 Dimes" or "50 Pennies". a You will loop through each coin denomination, with the possible exception of the penny. Here is a hint:
o If the number is 99, then subtract 50 from the numb W‘ his leaves 49, with one half dollar
used.
0 Next, subtract 25 from the total sing a loop.
0 Next, subtract 10 cents from the 'a‘ '. '
0 Finally record the four pennies left over. *- is leaves 24, with one quarter used
. oop. This will leave 4 cents, with two dimes used. o The output should read something like: "You have one half dollar, one quarter, two dimes, and four
pennies".

Answers

(11)
Status NEW Posted 28 Apr 2017 03:04 AM My Price 9.00

-----------

Not Rated(0)