Question: When the following code is run, the user types in 3 0 . What will be displayed? Console.Write ( Enter the total cost of

When the following code is run, the user types in 30. What will be displayed?
Console.Write("
Enter the total cost of your order: "); double totalCost = Convert.ToDouble(Console.ReadLine()); if (totalCost >=100) Console.WriteLine("You get free shipping"); else if (totalCost >=50.0 && totalCost <100.0) Console.WriteLine("You get a shipping rate of $5.00"); else if (totalCost >=30.0 && totalCost <50.0) Console.WriteLine("You get a shipping rate of $10.00"); else Console.WriteLine("You get a shipping rate of $20.00");

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!