Write a javascript program to make change you should use


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

87 cents is comprised of:

3 quarter(s)

1 dime(s)

0 nickle(s)

2 pennies

Hint: Remainders from division are calculated with the modulus operator.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a javascript program to make change you should use
Reference No:- TGS01136535

Now Priced at $30 (50% Discount)

Recommended (93%)

Rated (4.5/5)