using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Lab3
{
class
ProductSheet
{
static void
Main(string[] args)
{
int productNumber;
int productQuantity;
int input = 1;
double totalPrice=0;
while (input != 0)
{
Console.WriteLine("Enter
product number");
productNumber = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter
product quantity");
productQuantity = Convert.ToInt32(Console.ReadLine());
switch (productNumber)
{
case 1: totalPrice = totalPrice+ (productQuantity * 2.98);
break;
case 2: totalPrice = totalPrice + (productQuantity * 4.50);
break;
case 3: totalPrice = totalPrice + (productQuantity * 9.75);
break;
default: Console.WriteLine("No
product labeled the number entered.");
break;
}
Console.WriteLine("If
you would like to order more products enter any number, if want to stop and
total your bill enter the number 0");
input = Convert.ToInt32(Console.ReadLine());
}
Console.WriteLine("Your
total price is {0}", totalPrice);
Console.ReadLine();
}
}
}