|
-
January 18th, 2005, 01:33 AM
#1
need help to write Code in C#
"enumerate all the ways of making change for X cents."
For example, if given 10 cents, the possibilities include:
10 pennies, 5 pennies and 1 nickel, 2 nickels, and 1 dime.
You can assume the allowable denominations are pennies,
nickels, dimes and quarters.
cents : number of cents that you should enumerate the
change possibilities for (for example, 82)
Above C# Code used should be non-recursive.
-
January 18th, 2005, 01:55 AM
#2
Re: need help to write Code in C#
I dont think you can dump your school assignments here...
R. Thomas
"Be anxious for nothing, but in everything by prayer and supplication, with thanksgiving, let your requests be made know to God; and the peace of God, which surpasses all understanding, will guard your hearts and minds through Christ Jesus."Philippians 4:6-7
"Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18
-
January 22nd, 2005, 06:59 AM
#3
Re: need help to write Code in C#
not going to tell you how to do your hw,
but your logic should be:
for every option (bigger to smaller)
try to fit into given amount. all leftovers try to fit to smaller amounts. if successful - it means that in end of this process there will be no leftovers.
it is a simple / , % solution
-
January 22nd, 2005, 11:58 AM
#4
Re: need help to write Code in C#
For homework assignments, the best hing is to try your best, and when you get stuck post the code you have and we can help you get unstuck.
Useful? Then click on ( Rate This Post) at the top of this post.
For some useful C# Win 32 GUI recipes go here
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|