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
vredina [299]
3 years ago
11

Create a program that gets information from the owner and displays the current month’s expense for the employee’s wages. Require

ments: No loops or decision structures at this point Input comes from the keyboard when the owner enters the monthly data A month is 4 weeks Employees get paid once a month No taxes are taken out, currently it’s the employees job to do All of the input will be finished before the output begins The input: The owner should know which employee and week he is entering the information for Hourly:
Engineering
1 answer:
KatRina [158]3 years ago
8 0

Answer:

The code is in the explanation section below.

The sample output is

Espresso Yourself's Coffehouse

------------------------------

Enter details for Hourly employees:

Darren Duchesne:

Pay per hour: 6.45

Hours worked: Week 1: 35

Week 2: 35

Week 3: 35

Week 4: 35

Christian Cargile:

Pay per hour: 5.75

Hours worked: Week 1: 30

Week 2: 30

Week 3: 30

Week 4: 30

Selena Dresher:

Pay per hour: 6.25

Hours worked: Week 1: 30

Week 2: 30

Week 3: 30

Week 4: 30

Neil Palafox:

Pay per hour: 5.45

Hours worked: Week 1: 32

Week 2: 32

Week 3: 32

Week 4: 32

Salaried Employees:

Emilia Rogge:

Pay per annum: 32633

Weeks worked: 4

Jamie Lanphear:

Pay per annum: 27800

Weeks worked: 4

Explanation:

#include <bits/stdc++.h>

using namespace std;

struct employee{

string first_name, last_name;

int hours[4], weeks;

int total_hours;

double hour_pay;

double salary;

} emp[100];

int main()

{

emp[0].first_name = "Darren";

emp[0].last_name = "Duchesne";

emp[1].first_name = "Christian";

emp[1].last_name = "Cargile";

emp[2].first_name = "Selena";

emp[2].last_name = "Dresher";

emp[3].first_name = "Neil";

emp[3].last_name = "Palafox";

emp[4].first_name = "Emilia";

emp[4].last_name = "Rogge";

emp[5].first_name = "Jamie";

emp[5].last_name = "Lanphear";

cout<<"Espresso Yourself's Coffehouse\n";

cout<<"------------------------------\n";

cout<<"Enter details for Hourly employees: \n";

cout<<emp[0].first_name<<" "<<emp[0].last_name<<":\n";

cout<<"Pay per hour: ";

cin >> emp[0].hour_pay;

cout<<"Hours worked: ";

cout<<"Week 1: ";

cin >> emp[0].hours[0];

cout<<"Week 2: ";

cin >> emp[0].hours[1];

cout<<"Week 3: ";

cin >> emp[0].hours[2];

cout<<"Week 4: ";

cin >> emp[0].hours[3];

cout<<emp[1].first_name<<" "<<emp[1].last_name<<":\n";

cout<<"Pay per hour: ";

cin >> emp[1].hour_pay;

cout<<"Hours worked: ";

cout<<"Week 1: ";

cin >> emp[1].hours[0];

cout<<"Week 2: ";

cin >> emp[1].hours[1];

cout<<"Week 3: ";

cin >> emp[1].hours[2];

cout<<"Week 4: ";

cin >> emp[1].hours[3];

cout<<emp[2].first_name<<" "<<emp[2].last_name<<":\n";

cout<<"Pay per hour: ";

cin >> emp[2].hour_pay;

cout<<"Hours worked: ";

cout<<"Week 1: ";

cin >> emp[2].hours[0];

cout<<"Week 2: ";

cin >> emp[2].hours[1];

cout<<"Week 3: ";

cin >> emp[2].hours[2];

cout<<"Week 4: ";

cin >> emp[2].hours[3];

cout<<emp[3].first_name<<" "<<emp[3].last_name<<":\n";

cout<<"Pay per hour: ";

cin >> emp[3].hour_pay;

cout<<"Hours worked: ";

cout<<"Week 1: ";

cin >> emp[3].hours[0];

cout<<"Week 2: ";

cin >> emp[3].hours[1];

cout<<"Week 3: ";

cin >> emp[3].hours[2];

cout<<"Week 4: ";

cin >> emp[3].hours[3];

cout<<"Salaried Employees:\n";

cout<<emp[4].first_name<<" "<<emp[4].last_name<<":\n";

cout<<"Pay per annum: ";

cin >> emp[4].salary;

cout<<"Weeks worked: ";

cin >> emp[4].weeks;

cout<<emp[5].first_name<<" "<<emp[5].last_name<<":\n";

cout<<"Pay per annum: ";

cin >> emp[5].salary;

cout<<"Weeks worked: ";

cin >> emp[5].weeks;

 

emp[0].total_hours = emp[0].hours[0]+emp[0].hours[1]+emp[0].hours[2]+emp[0].hours[3];

emp[1].total_hours = emp[1].hours[0]+emp[1].hours[1]+emp[1].hours[2]+emp[1].hours[3];

emp[2].total_hours = emp[2].hours[0]+emp[2].hours[1]+emp[2].hours[2]+emp[2].hours[3];

emp[3].total_hours = emp[3].hours[0]+emp[3].hours[1]+emp[3].hours[2]+emp[3].hours[3];

 

cout<<"\n\n-----------------------------\n";

cout<<"Payroll for the month\n";

cout<<"Hourly Employees:\n";

cout<<"First Name Last Name\tHours Worked\tGross Pay\n";

cout<<emp[0].first_name<<" "<<emp[0].last_name<<"\t\t"<<emp[0].total_hours<<"\t"<<emp[0].hour_pay*emp[0].total_hours<<"\n";

cout<<emp[1].first_name<<" "<<emp[1].last_name<<"\t"<<emp[1].total_hours<<"\t"<<emp[1].hour_pay*emp[1].total_hours<<"\n";

cout<<emp[2].first_name<<" "<<emp[2].last_name<<"\t"<<emp[2].total_hours<<"\t"<<emp[2].hour_pay*emp[2].total_hours<<"\n";

cout<<emp[3].first_name<<" "<<emp[3].last_name<<"\t"<<emp[3].total_hours<<"\t"<<emp[3].hour_pay*emp[3].total_hours<<"\n";

cout<<"Salaried Employees:\n";

cout<<"First Name Last Name\tWeeks Worked\tGross Pay\n";

cout<<emp[4].first_name<<" "<<emp[4].last_name<<"\t"<<emp[4].weeks<<"\t"<<emp[4].weeks*emp[4].salary/48<<"\n";

cout<<emp[5].first_name<<" "<<emp[5].last_name<<"\t"<<emp[5].weeks<<"\t"<<emp[5].weeks*emp[5].salary/48<<"\n";

 

return 0;

}

You might be interested in
At many intersections, under certain circumstances, a right turn may be made while the traffic light is red. Before turning righ
ANTONII [103]

Answer:

The answer is A

Explanation:

4 0
3 years ago
NEED HELPASAP what is the moisture content of a board if a test sample that originally weighed 11. 5 oz was found to weigh 10 oz
Viefleur [7K]

Answer:

11.5-10/10= 0.15x100 =15%

Explanation:

3 0
2 years ago
What is the total inductance of a circuit that contains two 10 uh inductors connected in a parallel?
kolbaska11 [484]

Answer:

  5 microhenries

Explanation:

The effective value of inductors in parallel "add" in the same way that resistors in parallel do. The value is the reciprocal of the sum of the reciprocals of the inductances that are in parallel.

  10 uH ║ 10 uH = 5 uH

The effective inductance is 5 uH.

6 0
3 years ago
What purpose does the case of a rifle or handgun cartridge serve? A, To hold all of its components together To hold all of its c
Ivenika [448]

Answer:

D. To control the spread of the shot

7 0
3 years ago
Read 2 more answers
What is the function of the following: 1- Oil rings 2- Flywheel 3- Timing gears
Tanya [424]

Answer:

Explanation:

The functions of the following are as follows:

1). Oil Rings:

  • Regulates oil within cylinder walls.
  • Helps to keep cylinder walls lubricated
  • Prevent Heat transfer
  • Reduce friction between piston and cylinder

2). Fly Wheel:

  • It is used to store rotational energy
  • It resist any change in rotational speed due to its moment of inertia
  • It helps to control the orientation of the mechanical system

3). Timing gears:

  • It provides synchronization in the rotation of crankshaft and the camshaft so as to provide proper valve opening and closing time during each cylinder's stroke(intake and exhaust).
4 0
3 years ago
Other questions:
  • Pumped-storage hydroelectricity is a type of hydroelectric energy storage used by electric power systems for load balancing. The
    8·1 answer
  • A model of a submarine, 1:15 scale, is to be tested at 180 ft/s in a wind tunnel with standard sea-level air, while theprototype
    8·1 answer
  • What are the basic parts of a radio system
    15·1 answer
  • A waste treatment pond is 50m long and 25m wide, and has an average depth of 2m.The density of the waste is 75.3 lbm/ft3. Calcul
    12·1 answer
  • declare integer product declare integer number product = 0 do while product &lt; 100 display ""Type your number"" input number p
    8·1 answer
  • You are evaluating the lifetime of a turbine blade. The blade is 4 cm long and there is a gap of 0.16 cm between the tip of the
    9·1 answer
  • Which of the following are made up of electrical probes and connectors?
    8·1 answer
  • _____ are used to control the flow of electricity in a circuit.
    8·2 answers
  • If the load parameters are: Vln=600kV, Il=100A (resistive), calculate the source voltage and current when the line is 50Miles (s
    14·1 answer
  • Use the map to answer the question.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!