Question: Fix the code using C# shown below to show the repitition as seen on the example screenshot: (Invalid error must repeat): using System; using System.Collections.Generic;

Fix the code using C# shown below to show the repitition as seen on the example screenshot: (Invalid error must repeat):

Fix the code using C# shown below to show the repitition as

using System; using System.Collections.Generic; using System.Linq; using System.Text;

namespace Program { class Program { static void Main(string[] args) { double num, count = 0; double Tax = 0.00, ship = 5.00, sum = 0.00; double grandtotal; char line;

//Set run =true bool run=true; do {

//read amount of item Console.WriteLine("What is the amount of item : "); //read in num run=double.TryParse(Console.ReadLine(), out num); //check if run is not true that means returns false if entered //value is not number of type double while (!run) { //prompt for value Console.WriteLine("Please re-enter : "); Console.WriteLine("What is the amount of item : "); //read in num run = double.TryParse(Console.ReadLine(), out num); //check if run is true and num is less than 0 if (run && num

} while (line != 'n' && line != 'N');

Console.WriteLine("-----------------------------------------------"); Console.WriteLine("\t\tSales Receipt\t\t\t"); Console.WriteLine("Total Purchase : \t\t\t$" + string.Format("{0:0.00}", sum)); ship = sum / 10; Console.WriteLine("Shippint charges :\t\t\t$" + string.Format("{0:0.00}", ship)); Console.WriteLine("Number of item purchased:\t\t" + count);

if (count 3 && count 6 && count 10 && count

Console.WriteLine("-----------------------------------------------"); grandtotal = sum + ship + Tax; Console.WriteLine("Grand Total : \t\t\t\t$" + string.Format("{0:0.00}", grandtotal));

Console.ReadKey();

} } }

the of What i he item? - -10 Invalid data entered- Please re-enter the amount of the item- n Invalid data entered - Please re-enter the amount of the item - h Invalid data entered - Please re-enter the amount of the item -5.e s amount t

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 Databases Questions!