Question: In C# its Debugging and I have an error. using System; using static System.Console; public class DebugEleven01 { public static void Main(string[] arr) { double

In C# its Debugging and I have an error.

using System; using static System.Console; public class DebugEleven01 { public static void Main(string[] arr) { double salary=0; string salVal; bool isValidSalary=false; while(!isValidSalary) {try {Console.Write("Enter an employee's salary "); salVal = Console.ReadLine(); salary = Convert.ToDouble(salVal); isValidSalary = true;} catch(FormatException) {Console.WriteLine("You must enter a number for the salary");}} Console.WriteLine("The salary {0} is valid", salary.ToString("C2")); } }

In C# its Debugging and I have an error. using System; using

Instructions

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!