namespace Coin_Sorter
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Please input an amount of change");
float amountOfChange = float.Parse(Console.ReadLine());
int coinCount = 0;
while (amountOfChange > 0)
{
if (amountOfChange > 5)
{
amountOfChange -= 5;
coinCount++;
Console.WriteLine("taken 5");
Console.WriteLine(amountOfChange);
}
else if(amountOfChange > 2)
{
amountOfChange -= 2;
coinCount++;
Console.WriteLine("taken 2");
Console.WriteLine(amountOfChange);
}
else if(amountOfChange > 1)
{
amountOfChange -= 1;
coinCount++;
Console.WriteLine("taken 1");
Console.WriteLine(amountOfChange);
}
else if (amountOfChange > 0.50f)
{
amountOfChange -= 0.50f;
coinCount++;
Console.WriteLine("taken 0.50");
Console.WriteLine(amountOfChange);
}
else if (amountOfChange > 0.20f)
{
amountOfChange -= 0.20f;
coinCount++;
Console.WriteLine("taken 0.20");
Console.WriteLine(amountOfChange);
}