Question: The program DebugTwo3.cs has syntax and/or logical errors. Determine the problem(s) and fix the program. // This program computes net weekly pay // based on

The program DebugTwo3.cs has syntax and/or logical errors. Determine the problem(s) and fix the program.

// This program computes net weekly pay // based on hours worked, rate per hour, // and 15% withholding using System; using static System.Console; class DebugTwo3 { static void Main() { const double WITHHOLDING_RATE = 15; string hoursAsString, rateAsString; double hours, rate; double gross, withholding, net; Write("Enter the number of hours you worked this week >> "); hoursasString = ReadLine(); Write("Enter your hourly rate >> "); rateAsString = ReadLine() hours = Convert.ToDouble(hoursAsStrinng); rate = Convert.ToDouble(rateAsStrinng); gross = hours + rate; withholding = gross * WITHHOLDING_RATE; net = gross * withholding; WriteLine("You worked {0} hours at {1} per hour",hours,rate.ToString("C")); WriteLine("Gross pay is {0}", gross.ToString("C")); WriteLine("Withholding is {0}", withholding.ToString("C")); WriteLine("Net pay is {0}", netToString("C")); Console.ReadKey(); } }

Please provide fixed code with expected outputs

The program DebugTwo3.cs has syntax and/or logical errors. Determine the problem(s) and

Test Case Incomplete Calculates pay case 1 Input Output Results You worked 48 hours at $18.66 per hour Gross pay is $460.60 Withholding is $68.68 Net pay is $348. Show Details

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!