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
A(n) _____ chart is drawn on the same worksheet as the data.
Harrizon [31]
The answer is An embedded chart
6 0
3 years ago
Where is the risk of someone intercepting another person’s online activity the greatest?
sergey [27]

social networking site

3 0
3 years ago
Given numrows and numcols, print a list of all seats in a theater. rows are numbered, columns lettered, as in 1a or 3e. print a
trapecia [35]

/* package whatever; // don't place package name! */

import java.util.*;

import java.lang.*;

import java.io.*;

class NestedLoops {

public static void main (String [] args) {

int numRows = 4;

int numCols = 5;

int i,j;

char ch = 'A';

// Note: You'll need to declare more variables

/* Your solution goes here */

for ( i = 0; i < numRows; i++) { // Outer loop runs for numRows times

for ( j = 0; j < numCols; j++) { // Inner loop runs for numCols times

System.out.print(i+1);

System.out.print((char)(ch+j));

System.out.print(" ");

}

}

System.out.println("");

return;

}

}

8 0
3 years ago
When entering a formula or function into a cell, most spreadsheet programs require that you begin with some type of symbol, usua
olga_2 [115]
This is a false statement, if that's the question.
4 0
2 years ago
Laying on the lawn wondering where the summer's gone marshmallow clouds keep drifting by
nevsk [136]
Umm what?  uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
8 0
3 years ago
Other questions:
  • One of the most studied computational problems is the ordering of a collection of values. Ordering is important because many pro
    15·1 answer
  • To change a chart's data series, make the chart active, then in the data group on the chart tools design tab, click the _____ bu
    9·1 answer
  • You want to find information about Paris, France in the last five years, written in English. What is the best way to search for
    5·2 answers
  • If you press the key corresponding to letter A on the keyboard, what process is carried out inside the CPU to display the letter
    10·1 answer
  • Question 1 Multiple Choice Worth 5 points)
    10·1 answer
  • SQL statement to verify the updated name field for the publisher with ID 5 SELECT * FROM Publisher WHERE PubID=5;
    7·1 answer
  • is there anybody out there who is a social butterfly like me? If so then you can tlk to me on this. and to anybody out there tha
    12·1 answer
  • When writing code, how can printing be useful?
    15·1 answer
  • Demonstrate the register addressing mode for the following instructions. Also what addressing mode belongs to these instructions
    11·1 answer
  • Please help i only have 20 minuets
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!