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
fgiga [73]
4 years ago
12

// This pseudocode is intended to display // employee net pay values. All employees have a standard // $45 deduction from their

checks. // If an employee does not earn enough to cover the deduction, // an error message is displayed. // This example is modularized. start Declarations string name string EOFNAME = "ZZZZ" while name not equal to EOFNAME housekeeping() endwhile while name not equal to EOFNAME mainLoop() endwhile while name not equal to EOFNAME finish() endwhile stop housekeeping() output "Enter first name or ", EOFNAME, " to quit " return mainLoop() Declarations num hours num rate num DEDUCTION = 45 num net output "Enter hours worked for ", name input hours output "Enter hourly rate for ", name input rate gross = hours * rate net = gross - DEDUCTION if net > 0 then output "Net pay for ", name, " is ", net else output "Deductions not covered. Net is 0." endif output "Enter next name or ", EOFNAME, " to quit " input name return finish() output "End of job" return
Computers and Technology
1 answer:
Vikki [24]4 years ago
3 0

Answer:

C++ code is given below

Explanation:

#include<iostream>

#include <cstring>

using namespace std;

int housekeeping(string EOFNAME);

int mainLoop(string name,string EOFNAME);

int finish();

void main()

{

  string name;

  string EOFNAME = "ZZZZ";

  cout << "enter the name" << endl;

  cin >> name;

  if (name != EOFNAME)

  {

      housekeeping(EOFNAME);

  }

  if (name != EOFNAME)

  {

      mainLoop(name , EOFNAME);

  }

  if (name != EOFNAME)

  {

      finish();

  }

  system("pause");

}

int housekeeping(string EOFNAME)

{  

  cout << "enter first name " << EOFNAME << " to quit " << endl;

  return 0;

}

int mainLoop(string name, string EOFNAME)

{  

  int hours;

  int rate,gross;

  int DEDUCTION = 45;

  int net;

  cout << "enter hours worked for " << name << endl;

  cin >> hours;

  cout << "enter hourly rate for " << name << endl;

  cin >> rate;

  gross = hours*rate;

  net = gross - DEDUCTION;

  if (net > 0)

  {

      cout << "net pay for " << name << " is " << net << endl;

  }

  else

  {

      cout << "dedections not covered.net is 0.";

  }

  cout << "enter next name or " << EOFNAME << " to quit" << endl;

  cin >> name;

  return 0;

}

int finish()

{

  cout << "end of job"<<endl;

  return 0;

}

You might be interested in
Is social media and advancement of technology causing our society to become less social?
posledela
It is in ways but it can also connect people to eachother
3 0
3 years ago
Which scientific tool would be primarily used by scientists?
kkurt [141]
My answer is D. All the above :)
8 0
3 years ago
Read 2 more answers
Plz answer me will mark as brainliest​
charle [14.2K]
First one I think RAM and second one is Barcode reader
7 0
4 years ago
help i was building my pc and i pushed the cpu into the socket really hard until there was an audible crack and it went into the
Fed [463]
Try smashing it with a hammer, always helped me
4 0
3 years ago
A(n) ______________________________ is a camera mount that uses the concept of a lever and fulcrum and allows a camera to be rai
rewona [7]
Hey and thanks for giving me the chance to serve u
_________________tripod 
_______________
hope l helped
4 0
3 years ago
Other questions:
  • When you divide a picture into thirds, how many parts do you end up with? *
    14·2 answers
  • You will be given a value of n and k, one line each. You will write a program that determines the minimum number of probe attemp
    9·1 answer
  • Examine the following algorithm.
    9·1 answer
  • Why might the government censor what its citizens see on the internet?
    13·2 answers
  • Algorithms for solving perimeter of a rectangle
    12·1 answer
  • When would it be most beneficial to package a presentation on a CD? Check all that apply. when sending the file via email for di
    6·2 answers
  • What kind of email formatting change can you make using the Rules Wizard?
    12·1 answer
  • Which of the following statements best describes the relative amount of content held by digital libraries vs. the amount held by
    15·1 answer
  • Josh is learning about hackers know for finding loopholes in systems, without notifying the company or organization beforehand.
    13·1 answer
  • What is the address space of a computer with a 64-bit address bus?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!