Base Salary Console App

[code language=”csharp”] using System;

namespace BaseSalary
{
class MainClass
{
public static void Main(string[] args)
{
double baseSalary;
double totalSales;
double commissionRate;
double totalPay;
string continuetemp;
bool Continue = true;
while (Continue)
{
Console.Clear();
Console.Write("Enter Your Base Salary: ");
if (Double.TryParse(Console.ReadLine(), out baseSalary))
{
Console.Write("Enter your total sales: ");
if (Double.TryParse(Console.ReadLine(), out totalSales))
{
Console.Write("Enter your Commission Rate: ");
if (Double.TryParse(Console.ReadLine(), out commissionRate))
{
totalPay = baseSalary + (totalSales * commissionRate);
Console.WriteLine("Your Total Pay is {0}", totalPay);
Console.Write("Would you like to enter a new calcualtion? (y/n)");
continuetemp = Console.ReadLine();
if (continuetemp == "y") {
Continue = true;
}
else {
Continue = false;
}
}
else
{
Console.Write("Invalid! Please Enter Your Commission Rate in ##.## format: ");
}
}
else
{
Console.Write("Invalid! Please Enter Your Total Sales in ##.## format: ");
}

}
else
{
Console.Write("Invalid! Please Enter Your Base Salary in ##.## format: ");
}
}
}
}
}
[/code]