title: C# 2 Array Split Amount Question
body: <p>My question is i have a certain money amount, lets say 552.
  I wish to split that in its coins/bills => So the result would for example be 1x 500 1x 50 1x 2</p>
  
  <p>I have made 2 arrays for this:</p>
  
  <pre><code>double[] CoinValue = {500, 200, 100, 50, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.02,  0.01};
    uint[] CoinAmount = new uint[CoinValue.Length];
  </code></pre>
  
  <p>My problem is how exactly do i "tell" the array the value for 500 should be 1 in the countAmount array.=> 1. So if i have 1000 the array CoinAmount array would know it would need to hold 2 as value(2x500 = 1000).</p>
  
  <p>So my end result would be something like this, giving the amount of coin/bills:
  1 x 500
  1 x 50
  1 x 2
  .......</p>
  
  <p>Thanks in advance.</p>