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")); } }

Instructions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
