Write a program to find the minimum denomination for amount 5365 using 1000, 500, 100 and 5

Program:
========

using System;
using System.Collections.Generic;

namespace MinimumDenomination
{
    class Program
    {
        static void Main(string[] args)
        {
            Dictionary<int, int> dicOutPut = new Dictionary<int, int>();
            int[] denominations = { 1000, 500, 100, 5 };

            dicOutPut = getMinumumDemonitation(1850, denominations);
           
            foreach (var item in dicOutPut)
            {
                Console.WriteLine("{0} * {1} = {2}", item.Key, item.Value, item.Key * item.Value);
            }
            Console.ReadKey();

        }


        public static Dictionary<int, int> getMinumumDemonitation(int amount, int[] availableNotes)
        {
            Dictionary<int, int> deno = new Dictionary<int, int>();
            foreach (int i in availableNotes)
            {
                int k = i; int count = 0;
                while (k <= amount)
                {
                    count = count + 1;
                    k = i * count;
                }
                if (count > 1 && !deno.ContainsKey(i))
                {
                    deno.Add(i, count - 1);
                    amount = amount - i * (count - 1);
                }
            }
            return deno;
        }
    }
}


output: