akosiraff

Download countCoins JavaScript Answer

Jan 23rd, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1.  
  2. Download: https://solutionzip.com/downloads/countcoins-javascript/
  3. Write a JavaScript program to make change. You should use prompt() to read a string and parseInt() to convert the string into an integer number of cents (i.e. fractions of a dollar). Your program should write to the document how to deliver that number of cents as change using a minimum number of US coins as output. Ignore the 50 cent piece as a possible coin. So for example, given an input of 87, your program should output the following to the document:
  4. 87 cents is comprised of:
  5. 3 quarter(s)
  6. 1 dime(s)
  7. 0 nickle(s)
  8. 2 pennies
  9. Hint: Remainders from division are calculated with the modulus operator.
  10. Download: https://solutionzip.com/downloads/countcoins-javascript/
Add Comment
Please, Sign In to add comment