title: Constructing the coins combination c# code (beginning the loops)
body: <p>I'm trying to solve this task: "Having a coins of 1, 2, and 5 $, check for how many possible ways you will be able to get out of these coins combinations the sum of 10$"</p>
  
  <p>I cannot find the good solution for these as my code shows there's only 7 combinations. Could anyone help me to correct my way of thinking and code?</p>
  
  <pre><code>int combination_amount = 0;
  int cash_amount = 10;
  int a , b , c;
  for (a = 0; a &lt; 10; a++)
  {
      for (b = 0; b &lt; 5; b++)
      {
          for (c = 0; c &lt; 2; c++)
          {
              if (1 * a + 2 * b + 5 * c == 10)
              {
                  combination_amount += 1;
              }
          }
      }
  }
  Console.WriteLine("There is a total number of {0} combinations amount ", combination_amount);
  </code></pre>