Here is the code
static void Main(string[] args)
{
int qty, prodNum;
double totalRetail;
Console.WriteLine("Enter product number 1, 2, or 3. ");
prodNum = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter in quantity sold of this product or enter -1 to quit: ");
qty = Convert.ToInt32(Console.ReadLine());
totalRetail = 0;
while (qty != -1)
{
switch (prodNum)
{
case 1 :
totalRetail = 2.98 * qty;
break;
case 2:
totalRetail = 4.50 * qty;
break;
case 3:
totalRetail = 9.98 * qty;
break;
}
Console.WriteLine("Total Sales: {0:C}", totalRetail);
}
}
}
}
It doesn't just output the total what am I missing.
Thank you