public static void Main()
Console.WriteLine("Welcome to Change for a Dollar Console Game.");
Console.WriteLine("Please enter the amount of nickels: ");
nickel = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Please enter the amount of pennies: ");
penny = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Please enter the amount of dimes: ");
dime = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Please enter the amount of quarters: ");
quarter = Convert.ToInt32(Console.ReadLine());
totalNickel = nickel * 0.05M;
totalPenny = penny * 0.01M;
totalDime = dime * 0.10M;
totalQuarter = quarter * 0.25M;
totalValue = totalNickel + totalPenny + totalDime + totalQuarter;
if (totalValue == dollar)
Console.WriteLine("Congratulations! You won the game!");
Console.WriteLine("The amount entered was more or less than a dollar. Please try again.");
Console.WriteLine("{0:c}", totalValue);