I have a home work. I don't understand. Can you help me?
Subject: Given an amount of money (less than 10,000VND), compute the number coin of 500VND, 1,000VND, 2,000VND, 5,000VND needed. Remember that the number of coin is minimized.
This is a discussion on Help exercise! within the C++ Programming forums, part of the General Programming Boards category; I have a home work. I don't understand. Can you help me? Subject: Given an amount of money (less than ...
I have a home work. I don't understand. Can you help me?
Subject: Given an amount of money (less than 10,000VND), compute the number coin of 500VND, 1,000VND, 2,000VND, 5,000VND needed. Remember that the number of coin is minimized.
What do you not understand about your home work?
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
Yes.I don't understand and I can't doing it. Can you help me!
I did not ask if you did not understand, since that was clear. I asked what it was that you did not understand.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
i don't understand algorithm
Ah. If you want to "cheat", search the Web for "greedy algorithm". If you want to try to come up with an algorithm yourself (and you should), get some coins of different denominations, come up with some amount at random that can be made up of your coins, then try out systematic ways of solving the problem. When you have found one, implement it.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
Can you help me code it exercise?
Maybe, subject to the homework policy.Originally Posted by sanhthai
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
It doesn't matter if the assignment was given to you by a teacher, or you found it from a book. The point of doing exercises is that you try to figure out things for yourself.
Try it out with some sums and think how you came up with the answer.
For example, if the sum is 9500 VND, then the coins you are looking for would be 1 x 5000, 2 x 2000 and 1 x 500.
I might be wrong.
Quoted more than 1000 times (I hope).Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.