copied dari tutorial gw : (jgn pduliin soalny tapi liat hintny)
Given some amount of money (in cents, ¢),
write a recursive solution along with its Java code to count the number of ways we can represent the money using coins.
The coins are in the following denominations (¢): 1, 5, 10, 20, 50, and 100.
For example:
a.3¢ can be represented in 1 way (3 × 1¢).
b.5¢ can be represented in 2 ways (5 × 1¢, or 1 × 5¢).
c.10¢ can be represented in 4 ways (10 × 1¢, 2 × 5¢, 1 × 5¢ + 5 × 1¢, or 1 × 10¢).
Hint: Be careful. -------> hint macem ap coba.. zzz.. si prof minta distab. grrrrr.
hahaha.. mau bkin kasus lg si hans XD
ReplyDeletego hans go! jangan mau kalah ama ntu hans!!
ReplyDelete