Complete Question:
Write a C# program named *ProjectedRaises* that includes a named constant representing next year’s anticipated 4 percent raise for each employee in a company. Also declare variables to represent the current salaries for three employees. Assign values to the variables, and display, with explanatory text, next year’s salary for each employee.
Convert the *ProjectedRaises* class to an interactive application named . Instead of assigning values to the salaries, accept them from the user as input.
The code in C# is provided in the explanation section
Explanation:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static System.Console;
namespace
{
class
{
static void Main(string[] args)
{
const double percentIncrease = 1.04;
double inputFirstSalary = 0;
double inputSecondSalary = 0;
double inputThirdSalary = 0;
double outputFirstSalary = 0;
double outputSecondSalary = 0;
double outputThirdSalary = 0;
//skip error checking
Write("Enter Value for First Salary");
inputFirstSalary = double.Parse(ReadLine());
Write("Enter Value for Second Salary");
inputSecondSalary = double.Parse(ReadLine());
Write("Enter Value for Third Salary");
inputThirdSalary = double.Parse(ReadLine());
outputFirstSalary = inputFirstSalary * percentIncrease;
outputSecondSalary = inputSecondSalary * percentIncrease;
outputThirdSalary = inputThirdSalary * percentIncrease;
WriteLine("Expected Salary Increase:{0}", percentIncrease;);
WriteLine("{0} will be {1} next year.", inputFirstSalary, outputFirstSalary);
WriteLine("{0} will be {1} next year.", inputSecondSalary, outputSecondSalary);
WriteLine("{0} will be {1} next year.", inputThirdSalary, outputThirdSalary);
}
}
}