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
Explain Flags in ARM Processor​
kipiarov [429]

Answer:

The ARM processor normally contains at least the Z, N, C, and V flags, which are updated by execution of data processing instructions.

Explanation:

3 0
3 years ago
Match the following parts of a crane
trasher [3.6K]
It is auxillary sorry i couldn’t help it happens to the best of us
5 0
3 years ago
Kerosene flows through 3/4 standard type K drawn copper tube. The pressure drop measured at two points 50 m apart is 130 kPa. De
jok3333 [9.3K]

Answer:

Q=4.98\times 10^{-3}\ m^3/s.

Explanation:

Given that

L= 50 m

Pressure drop = 130 KPa

copper tube is 3/4 standard type K drawn tube.

From standard chart ,the dimension of 3/4 standard type K copper tube given as

Outside diameter=22.22 mm

Inside diameter=18.92 mm

Dynamic viscosity for kerosene

\mu =0.00164\ Pa.s

We know that

\Delta P=\dfrac{128\mu QL}{\pi d_i^4}

Where Q is volume flow rate

L is length of tube

d_i is inner diameter of tube

ΔP is pressure drop

μ is dynamic viscosity

Now by putting the values

\Delta P=\dfrac{128\mu QL}{\pi d_i^4}

130\times 1000=\dfrac{128\times 0.00164\times 50Q}{\pi \times 0.01892^4}

Q=4.98\times 10^{-3}\ m^3/s

So flow rate is Q=4.98\times 10^{-3}\ m^3/s.

6 0
3 years ago
The function below takes a two parameters: a list called a_list and a value called a_value. Complete the function to first check
Alik [6]

Explanation:

def checklist(a_list, a_value):// def //used to name a function, the //arguments being passed into the //functions are a_list and a_value

if a_value in list://if statement to

//check if it's in the list or not

print("")//print statement to do

//nothing

else://else statement for if the

//a_value is in a_list

a_list.append(a_value)//this adds

//the value to the list

5 0
3 years ago
What are three common hazardous
Delicious77 [7]

Answer:

  1. SNOW SQUALLS - Squalls are substantial snow showers that cause white-out conditions. A couple of squalls are conceivable at the beginning of today through mid-evening. The most elevated possibility is north of the expressway.
  2. COLD - Because of away from and a new cover of day off, have plunged to the youngsters and 20s. There are frigid untreated surfaces.
  3. WINDS – One can expect supported breezes 15-25 mph this evening, with blasts to 40 mph. Solid breezes, alongside temperatures during the 30s, will create wind chills during the 20s.
  4. FOG - Perceivability is improving, however parts of Lancaster, Lebanon, Schuylkill, Berks, and Dauphin Provinces have decreased perceivability. With temperatures beneath freezing, mist can stick to the streets and produce frigid conditions.

Explanation:

An effect day in Pennsylvania is a day that highlights climate that will probably upset your typical every day calendar or schedule. At the point when the News 8 Tempest Group accept climate arrives at this limit, a yellow triangle with a shout imprint will show up on the figure demonstrating the climate will cause an effect. You may likewise observe the symbol utilized during a day-part figure when the News 8 Tempest Group accepts certain times may have a greater amount of an effect than others. An effect day's climate isn't viewed as outrageous or serious, perilous climate.  

Light downpour, day off, ice during a morning or night drive would be instances of effect climate. Most Pennsylvania workers can deal with driving in light downpour, day off, ice, however light downpour, day off, ice at the pinnacle of busy time can upset travel or cause mishaps because of the high volume of drivers. Thick mist over the Valley which could likewise modify a drive would be delegated an effect day.  

Moderate cold throughout the fall, winter, spring months, or warmth in the mid year months that may constrain open air presentation to the components would get this assignment.  

The Susquehanna Valley is a significant agrarian community for the locale. Pre-summer or late-summer ice or freezes that could harm or murder vegetation would fit into this class.  

Days that component consume bans from delayed droughts combined with solid breeze blasts likewise would be considered to conceivably make an effect a day ahead.

4 0
3 years ago
Other questions:
  • If you are driving a 30-foot
    15·1 answer
  • Draw an ERD for each of the following situations. (If you believe that you need to make additional assumptions, clearly state th
    15·1 answer
  • A coin placed 30.8 cm from the center of a rotating, horizontal turntable slips when its speed is 50.8 cm/s.
    12·1 answer
  • Two technicians are discussing a vehicle that will not start. Tech A states that a problem with the immobilizer system may be th
    9·1 answer
  • How may a Professional Engineer provide notice of licensure to clients?
    9·1 answer
  • If the driver gear has 5 teeth and the driven gear has 10 teeth,what is the gear ratio?​
    13·2 answers
  • When removing a diesel engine from a truck, Technician A says it is OK to disconnect an air con­ditioning hose, but the refriger
    8·1 answer
  • Alguém para conversa
    13·1 answer
  • How might a field like philosophy of history help scientists​
    14·1 answer
  • The side area of the door shell that is concealed when the door is closed is called the:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!