Netlinkaccess - All about Payroll Services and Accounting
*Home>>>Payroll Program

Can someone help me write a C++ program that request the hours worked.?


The program is as followed: Sheila, Taron and Randy work on the lab a certain amount of hours each week. They are paid $8.50 per hour. However, if they work more than 20 hours, they are paid $12.00 for excess hours. Write a program, that request the hours worked for each of the students above, and outputs a payroll as follows.
(centered)
Computer Science Lab Payroll
Person, Hours, Total
Shelia, 10, 85.00
Taron, 30, 290.00
Randy, 22 , 194.00
**************************************...
Total Payroll 569.00-

float getPersonTotal(int hours)
{
float total = 0;

if (hours > 20)
{
total += (float)12.00 * (hours - 20);
hours = 20;
}

total += (float)8.50 * (hours);
return total;
}

int main()
{

int sheila =0;
int taron =0;
int randy =0;

cin >> sheila;
cin >> taron;
cin >> randy;

cout << "\t\tComputer Science Lab Payroll" << endl;
cout << "\t\tPerson, Hours, Total" << endl;
cout << "\t\tSheila," << sheila << "," << getPersonTotal(sheila) << "endl;"
cout << "\t\tTaron," << taron<< "," << getPersonTotal(taron) << "endl;"
cout << "\t\tRandy," << randy << "," << getPersonTotal(randy) << "endl;"
cout << "\t\t**********************" << endl;
cout << "\t\tTotal Payroll " << getPersonTotal(shela) + getPersonTotal(taron) + getPersonTotal(randy) << endl;

return 0;
}

come on man, you can do it. no body would provide you complete code. so try it. it is simple math and print.

Tags
  Payroll Card   Payroll Tax   Payroll Accounting   Online Payroll   Adp Payroll   Payroll Program   Payroll Software   Payroll System   Payroll Processing   Payroll Services
Related information
  • A peachtree accounting payroll question?

    You will need to do this manually. It is the fastest and easiest way. In the months that you have 3 payrolls, just override those entries to 0. It is only twice and it will save you a lot of head...

  • Payroll direct deposit?

    Different branches of the same bank will have different routing numbers. Check it out here: ...

  • What % of payroll taxes go to public assistance programs such as welfare?

    32% of federal taxes goes to Human Resources ($748 billion) this includes: 鈥?Health/Human Services 鈥?Soc. Sec. Administration 鈥?Education Dept. 鈥?Food/Nutrition programs 鈥?Housing & Urba...

  • I need to track my time for my own use. What timesheet program do you recommend?

    I would create an Excel spreadsheet to use, but I would use Excel for everything if I could get away with it! :)

    ...
  • Hi i just passed my accounts exam Is there a volutery accounts program as i require experience to get a job.?

    look in the phone book and contact local accountants. I am sure you will find one of them happy to give you a few months trial. if you are luckly, you will get paid as well . good luck

    ...
  • Does Hillary know something about Social security the trustees of the program dont?

    Like most people who support socialism, Hillary Clinton does not live in the real world. There should be no question about her being a socialist after that statement inferring that private control ...

  • What is the advantage in participating employer sponsered flexible spending dependent care account program?

    The advantages of the dependent care benefits through your employer are: 1. You can exclude up to $5,000 of your wages to be used for qualified dependent care (both you and your spouse have to ...

  • What is the best accounting program MYOB or Quicken?

    MYOB is a much better program than Quicken (Quickbooks), alot better if you have some accounting background, Quicken tries to simplify things and ends up making them worse to use. Most accountants...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster