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
What are the two different types of dns requests?
Fantom [35]

The two major types of DNS request are as follows;

  • Recursive Query
  • Iterative Query

<h3>What is a domain name system?</h3>

Domain name system is abbreviated as DNS.

A Domain Name System (DNS) converts domain names into IP addresses, which allow browsers to get to websites and other internet resources.

Basically,  DNS is a directory of names that match with numbers.

Computer uses IP addresses to communicate, therefore, the DNS convert domain names to IP address for communication.  

The two major types of DNS request are as follows;

  • Recursive Query - Query that demands a resolution
  • Iterative Query - Query that does not demand a resolution.

learn more on DNS here: brainly.com/question/14397200

#SPJ11

6 0
2 years ago
Read 2 more answers
Insurance can help you:
seraphim [82]
Yes insurance can help you
3 0
3 years ago
Read 2 more answers
What is nasa data speed
Goshia [24]
NASA downloaded data at a rate of 622 megabits per second<span> (Mbps) using a pulsed laser beam. For comparison's sake, Akamai technologies says that the average internet user has a connection speed of </span>3.3 Mbps<span>. In the United States, the average connection speed is </span>8.7 Mbps<span>.</span>
6 0
3 years ago
What does l m a o actually mean?
vladimir2022 [97]

Answer:

L-Laughing m-my a-a*s o-off

Explanation:

8 0
3 years ago
The first thing you must consider in any type of communication is ______.
Wittaler [7]
As for this problem together with the options as answers presented with it, the most probable and the most likely answer would be C. the purpose of the communication.

The first thing you must consider in any type of communication is the purpose of the communication itself. Determining the purpose behind the communication would, in turn, pave way to determining the other things that is needed to be determined such as the type of communication, the style of communication, the timing of the communication, and so on and so forth.
5 0
3 years ago
Read 2 more answers
Other questions:
  • Effective feedback should focus on the behavior, not the person.<br><br> True<br> False
    9·2 answers
  • The negotiation by the transport layer at the sender with the transport layer at the receiver to determine what size packets sho
    14·1 answer
  • What are the two main functions of user accounts in Active Directory? (Choose all that apply.) Allow users to access resources m
    7·2 answers
  • What are three ways you cite evedince
    5·2 answers
  • To close the ____ view, click File on the Ribbon or click the preview of the document in the Info gallery to return to the docum
    9·1 answer
  • How is a technical certificate like a computer-related associate degree?
    12·2 answers
  • When are bar charts most commonly used
    10·1 answer
  • Which is NOT an example of a "Serious Game"?
    9·1 answer
  • Take two String inputs of the same length and merge these by taking one character from each String (starting with the first ente
    8·2 answers
  • A computer has __________processing device
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!