1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
blagie [28]
3 years ago
15

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 3. Then next year's salary for employee 1 would be displayed as: Next year's salary for the first employee will be $26,000.00
Computers and Technology
1 answer:
nydimaria [60]3 years ago
7 0

Answer:

using System;

class ProjectedRaises {

 static void Main() {

     const float raise = 0.04f;

     double salary1 = 0.0f,salary2 = 0.0f,salary3 = 0.0f;

Console.WriteLine("Current salary for each employee: ");

     salary1 = Single.Parse(Console.ReadLine());

     salary2 = Single.Parse(Console.ReadLine());

     salary3 = Single.Parse(Console.ReadLine());

     salary1 = salary1 + raise * salary1;

     salary2 = salary2 + raise * salary2;

     salary3 = salary3 + raise * salary3;

     Console.WriteLine("Next year salary for the employees are: ");

     Console.WriteLine(Math.Round(salary1));

     Console.WriteLine(Math.Round(salary2));

     Console.WriteLine(Math.Round(salary3));

}

}

Explanation:

This declares and initializes variable raise as a float constant

     const float raise = 0.04f;

This declares the salary of each employee as double

     double salary1 = 0.0f,salary2 = 0.0f,salary3 = 0.0f;

This prompts the user for the salaries of the employee

Console.WriteLine("Current salary for each employee: ");

The next three lines get the salary of the employees

<em>      salary1 = Single.Parse(Console.ReadLine());</em>

<em>      salary2 = Single.Parse(Console.ReadLine()); </em>

<em>      salary3 = Single.Parse(Console.ReadLine()); </em>

The next three lines calculate the new salaries of the employees

<em>      salary1 = salary1 + raise * salary1;</em>

<em>      salary2 = salary2 + raise * salary2;</em>

<em>      salary3 = salary3 + raise * salary3;</em>

This prints the header

     Console.WriteLine("Next year salary for the employees are: ");

The next three lines print the new salaries of the employees

     Console.WriteLine(Math.Round(salary1));

     Console.WriteLine(Math.Round(salary2));

     Console.WriteLine(Math.Round(salary3));

You might be interested in
How Charles Babbage Concept of<br>Computer has help the modern<br>Computer​
OLga [1]

English mathematician and inventor Charles Babbage is credited with having conceived the first automatic digital computer. During the mid-1830s Babbage developed plans for the Analytical Engine. Although it was never completed, the Analytical Engine would have had most of the basic elements of the present-day computer.

6 0
3 years ago
Which of the operating systems listed below is not proprietary?
Jobisdone [24]
One which is open source, linux based
3 0
3 years ago
Charli D'amelio bought her followers. <br><br> True or true? ;)​
tatuchka [14]

Answer:

I Think its true

Explanation:

because it's TRUE

7 0
3 years ago
Read 2 more answers
What are the high and low temperatures on Saturn? (C)
slava [35]
Saturn contains three layers of clouds. The upper layers of ammonia ice have temperatures ranging from minus 280 F to minus 170 F. The next layer contains water ice, with temperatures from minus 127 F to 26.Temperatures in the lower layers climb as high as 134 F.
8 0
3 years ago
Which term describes a character used to separate items in a text file?
frosja888 [35]

Answer:

extension describes a character used to separate items in a text

6 0
3 years ago
Other questions:
  • Three healthcare firms jointly own and share the same cloud resources to meet their computing needs. Which cloud model does this
    15·1 answer
  • find all breweries that specialize in a particular beer style. A brewer is considered specialized if they produce at least 10 be
    5·1 answer
  • True false) ther are five arrow keys on the keborad​
    9·1 answer
  • Stamps offers at-home postage and mailing for a monthly fee. Customers are able to carry a balance on their accounts that allows
    7·1 answer
  • What are those jackets called the ones with lots of straps inside, like in movies where they store there ammo etc?
    13·1 answer
  • . An access specifier is one of three keywords:
    14·1 answer
  • If you are logged on to Windows Live Messenger, why would you be unable to engage
    14·1 answer
  • Alright, so I have a wireless mouse that uses a dongle (it's not Bluetooth nor wired). But recently I realized that none of the
    12·1 answer
  • Evaluate the merits of a hard disk drive or a solid state drive to use as the secondary storage
    5·1 answer
  • Mike logged into a shopping website and entered his username and password. Which protocol will the website use to verify his cre
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!