TubSales - using System namespace ConsoleApplication1 cfw class Program cfw static void Main(string args cfw char initial double sAmountA = 0 sAmountB =

TubSales - using System namespace ConsoleApplication1 cfw...

This preview shows page 1 - 2 out of 2 pages.

using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { char initial; double sAmountA = 0, sAmountB = 0, sAmountE = 0, tip = .10, Acomission = 0, Bcomission = 0, Ecomission = 0, Atotal = 0, Btotal = 0, Etotal = 0; Console.Write("Initial "); initial = Convert.ToChar(Console.ReadLine()); while (true) { if (initial == 'A') { Console.Write("Sale $", sAmountA); sAmountA = Convert.ToDouble(Console.ReadLine()); Acomission = sAmountA * tip; Atotal = Acomission + Atotal; Console.WriteLine("Comission {0}", Acomission.ToString("C")); } if (initial == 'B') { Console.Write("Sales $", sAmountB); sAmountB = Convert.ToDouble(Console.ReadLine()); Bcomission = sAmountB * tip; Btotal = Bcomission + Btotal; Console.WriteLine("Comission {0}",
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read both pages?

  • Fall '13
  • Sales, Etotal, Atotal, initial ==, Acomission, Bcomission

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes