coin change help

don.r.garcia

Prominent
Jan 30, 2018
2
0
510
0
1. Make sure that the values of quarters, dimes, nickels, and pennies are stored as constants in your program. These values are 25, 10, 5, and 1 respectively.
2. Greet the user with your name and what this program accomplishes.
– For example, "Welcome to Dr. Church's Coin Change Calculator"
3. Prompt the user for an amount of money in cents.
4. Compute and display the number of quarters, dimes, nickels, and pennies. Make sure that each denomination is clearly labeled.
 

canadianvice

Honorable
Jul 25, 2012
234
1
10,910
47
I'll give you a hint: You want to deal with parsing out the coins starting with your largest amount. It's the exact same change-counting algorithm you would do in a store, given a decriminalized currency like the Dollar.

Also, keep in mind the % modulo operator. Might be useful.
 

anort3

Distinguished
Moderator
MERGED QUESTION
Question from don.r.garcia : "1. Make sure that the values of quarters, dimes, nickels, and pennies are stored as constants in your program. These values ar"



 

canadianvice

Honorable
Jul 25, 2012
234
1
10,910
47
I'll give you a hint: You want to deal with parsing out the coins starting with your largest amount. It's the exact same change-counting algorithm you would do in a store, given a decriminalized currency like the Dollar.

Also, keep in mind the % modulo operator. Might be useful.
 
Thread starter Similar threads Forum Replies Date
Aksheev Apps General Discussion 4
L Apps General Discussion 2
F Apps General Discussion 6
M Apps General Discussion 1
U Apps General Discussion 1
F Apps General Discussion 3
M Apps General Discussion 4
M Apps General Discussion 7
C Apps General Discussion 2
B Apps General Discussion 8
Z Apps General Discussion 10
RepoDraghon Apps General Discussion 1
Z Apps General Discussion 3
A Apps General Discussion 3
B Apps General Discussion 1
J Apps General Discussion 4
D Apps General Discussion 1
J Apps General Discussion 6
M Apps General Discussion 1
anoori9000 Apps General Discussion 1

ASK THE COMMUNITY

TRENDING THREADS