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.

Note: For final submission assign the following current salaries for the employees: 25000 for employee 1, 38000 for employee 2, 51000 for employee three.

Then next year's salary for employee 1 would be displayed as: Next year's salary for the first employee will be $26,000.00CENGAGE MINDTAP Q Search this course Programming Exercise 2-4 0 x Tasks Projected Raises.cs + >- Terminal + 1 using System; 2I need the answer to have two decimals.

0 0
Add a comment Improve this question Transcribed image text
✔ Recommended Answer
Answer #1

Code Screenshot:

main.cs 2 - using System; 3 using static System.Console; 4. class ProjectedRaises { 5 static void Main() { const float salary

Code:


using System;
using static System.Console;
class ProjectedRaises {
static void Main() {
const float salaryIncrement= 0.04f;
String.Format("{0:n1}", 25000);
float employee1 = 25000;
float employee2 = 38000;
float employee3 = 51000;
Console.WriteLine("Next year's salary for the first employee will be $" + (employee1 +( employee1*salaryIncrement)).ToString("0.00"));
Console.WriteLine("Next year's salary for the second employee will be $" + (employee2 + (employee2*salaryIncrement)).ToString("0.00"));
Console.WriteLine("Next year's salary for the third employee will be $"+ (employee3 +( employee3*salaryIncrement)).ToString("0.00"));
  
}
}

Please Thumbs Up if it helps you ;)

Add a comment
Know the answer?
Add Answer to:
Write a C# program named ProjectedRaises that includes a named constant representing next year’s anticipated 4...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT