Count the coins: Difference between revisions
m
→{{header|V (Vlang)}}
Line 3,849:
<syntaxhighlight lang="go">
fn main() {
amount :=
coins := [
println("amount: $amount; ways to make change: ${count_2(coins, amount)}")
}
fn count(coins []int, amount int) int {
mut
for coin in coins {
for idx := coin; idx <= amount; idx++ {
}
}
return
}
</syntaxhighlight>
Output:
<pre>
amount:
</pre>
|