Intro #9-1:

CSharp · Console

/Program.cs

// Directions: Practice #9-1
// 1) Log in and Fork this fiddle your account.
// 2) Create a nested if structre as described below.
// 3) Save your fiddle and submit the link in Blackboard.
using System;
					
public class Program
{
	public static void Main()
	{
		string strHoursWorked = "82.5";
		string strHourlyRate = "45.25";
		double dblHoursWorked;
		double dblHourlyRate;
		double dblPay;
		
		// Construct a nested if structure that does the following:
		// * TryParse the strHoursWorked variable in the dblHoursWorked variable.
		// * if the strHoursWorked variable can be parsed
		// * 	continue with the second if that TryParses the dblHourlyRate.
		// *    if the strHourly reate can be parsed
		// *		Calculate and store the dblPay.
		// *		Display the nice message to the user.  "The Pay is $3,733.13"
		// *    else
		// *    	Display "Hours Rate cannot be parsed.  
		// * else
		// * 	Display "Hourly Worked cannot be parsed.
		// * 
			
				
	}
}
;