using System.Collections.Generic;
public class PurchaseCalc
public static void Main()
double itemAmnt, nItems = 0, sCharge, tax, gTotal, sTax = 0.10, tPurchase = 0.0;
Console.WriteLine("This application computes the total due for your purchases.");
Console.WriteLine("It will allow you to enter any number of purchase amounts.");
Console.WriteLine("When you are finished entering purchases, it displays the");
Console.WriteLine("total due including sales tax and shipping charges.");
while (answer.ToLower() == "y")
Console.Write("\n\nWhat is the ammount of the item? ");
itemAmnt = double.Parse(Console.ReadLine());
Console.WriteLine("\n\nDo you want to enter more purchases? - Y or N? ");
answer = Console.ReadLine();
gTotal = tPurchase + tax + sCharge;
Console.WriteLine("_______________________________________________");
Console.WriteLine("\t\tSales Receipt");
Console.WriteLine("Total Purchases: \t\t{0:C}", tPurchase);
Console.WriteLine("Sales Tax: \t\t\t{0:C}", tax);
Console.WriteLine("Number of Items Purchased: \t" + nItems);
Console.WriteLine("Shipping charge: \t\t{0:C}", sCharge);
Console.WriteLine("_______________________________________________");
Console.WriteLine("Grand Total: \t\t{0:C}", gTotal);