Question: help me with this problem i need it in C# only Convert the ProjectedRaises class to an interactive application named ProjectedRaisesInteractive. Instead of assigning values

help me with this problem i need it in C# only
Convert the ProjectedRaises class to an interactive application named ProjectedRaisesInteractive. Instead of assigning values to the salaries, accept them from the user as input.
Output for each employee should be formatted similar to the following example for the first employee: Next year's salary for the first employee will be $26,000.00.
Note: The salary in the output will change depending on the user input.
In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this, include the statement using System.Globalization; at the top of your program and format the output statements as follows: WriteLine("This is an example: {0}", valu
using System;
using static System.Console;
using System.Collections.Generic;
//using system.Linq;
//using system.Text;
//using system.Threading.Task;
using System.Globalization;
class ProjectedRaisesInteractive
{
//class program
//{
static void Main(string[] args)
{
// Write your code here
const double RAISE=0.04;
double firstSalary=0, secondSalary=0, thirdSalary=0;
try
{
Write("Enter the salary for the first employee: ");
firstSalary = Convert.ToDouble(ReadLine());
Write("Enter the salary for the second employee: ");
secondSalary = Convert.ToDouble(ReadLine());
Write("Enter the salary for the third employee: ");
thirdSalary = Convert.ToDouble(ReadLine());
}
catch(Exception)
{
WriteLine("Please write in the correct format. ");
}
// Display next year's salary for each employee with currency formatting
WriteLine("Next year's salary for the first employee will be {0}",(firstSalary + firstSalary * RAISE).ToString("C"), CultureInfo.GetCultureInfo);
WriteLine("Next year's salary for the second employee will be {0}",(secondSalary + secondSalary * RAISE).ToString("C"), CultureInfo.GetCultureInfo);
WriteLine("Next year's salary for the third employee will be {0}",(thirdSalary + thirdSalary * RAISE).ToString("C"), CultureInfo.GetCultureInfo);
}
//}
}
using System;
using static System.Console;
using System.Globalization;
class ProjectedRaises
{
static void Main()
{
// Write your code here
const double RAISE =0.04;
double firstSalary =25000, secondSalary =38000, thirdSalary =51000;
WriteLine("Next year's salary for the first employee will be {0}",(firstSalary + firstSalary * RAISE).TOString("C"));
WriteLine("Next year's salary for the second employee will be {0}",(secondSalary + secondSalary * RAISE).ToString("C"));
WriteLine("Next year's salary for the third employee will be {0}",(thirdSalary + thirdSalary * RAISE).ToString("C"));
}
}

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!