Question

In: Computer Science

You are asked to compute weekly payment for an employee working at CubixLabs. The CubixLabs has...

You are asked to compute weekly payment for an employee working at CubixLabs. The
CubixLabs has a policy such that, if the employee works less than 50 hours in a week then
he/she will get payment as per the given payment rate, that is amount per hour. Otherwise (in
all other conditions) he/she will get payment which is 50 x payment rate. Develop program
using C language

Solutions

Expert Solution

In the above question, we need to process salary of an employee.

In the given question, let us understand the given statements,

We need to compute weekly payment.

if employee works less than 50 hrs then we will process according to the number of hours he/she worked * payment rate

and if employee works more than or equal to 50 hrs then the payment will be 50 * payment rate.

#include<stdio.h>
#include<conio.h>
int main()
{
  float payment_rate;
  float number_of_hours;
  float net_salary;
  clrscr();
  printf("Enter Payment Rate: ");
  scanf("%f",&payment_rate);
  printf("Enter number of hours worked in a week: ");
  scanf("%f",&number_of_hours);
  if(number_of_hours < 50)
  {
    net_salary=number_of_hours * payment_rate;
  }
  else
  {
    net_salary=50 * payment_rate;
  }
  printf("Net Salary calculated in a week: %f",net_salary);
  getch();
  return 0;
}

Let us see the code, input and output generated by the compiler.

Now let us understand the input and output

In the above input/output, number of hours worked is less than 50, so we will simply calculate net salary by payment rate * number of hours worked in week.

In above example, number of hours worked is 60 which is more than 50 so we will calculate net salary by payment rate * 50


Related Solutions

C++ Task: Compute the weekly pay for each employee at the Wahoo Widget Company. For each...
C++ Task: Compute the weekly pay for each employee at the Wahoo Widget Company. For each employee, you will calculate the base pay according to the appropriate salary category, and then subtract taxes and deductions. Write the program in C++ only. Input: For each employee, read an employee ID (a 4-digit integer) and a salary category code (see below). Then read whatever other information might be needed to compute a net salary for that person. Because of occasional employee turn-over,...
You are an employee working with the elderly in a health care facility. As an employee,...
You are an employee working with the elderly in a health care facility. As an employee, discuss the actions you would take if faced with the following situation. An elderly adult confides in you that her son is forging her name on checks and gradually emptying out her bank account. Are there legal implications? Are there ethical considerations?
Requirements: Compute the OASDI for each employee. Compute the HI for each employee. On the Employer...
Requirements: Compute the OASDI for each employee. Compute the HI for each employee. On the Employer Register, compute the employer FICA liability. Payroll Register Complete the steps below: Compute the OASDI for each employee. Compute the HI for each employee. Compute the totals for each tax. Note: Round your final answers to the nearest cent. KIPLEY COMPANY, INC. Employee Payroll Register For Period Ending January 8, 20-- EARNINGS DEDUCTIONS NET PAY Name Gross OASDI HI   FIT     SIT     SUTA     CIT   SIMPLE...
You are working for a local accountant during tax season and the accountant has asked you...
You are working for a local accountant during tax season and the accountant has asked you to prepare the appropriate tax form for Ace Company. Ace Company is a newly formed handyman business owned by Mr. and Mrs. Becker. Mrs. Becker just enrolled in her first bookkeeping class and created the spreadsheet you were given (attached file located above).   As you can see Mrs. Becker left you a note about not paying any taxes this year.   Update Mrs. Becker’s spreadsheet for...
You are working for a local accountant during tax season and the accountant has asked you...
You are working for a local accountant during tax season and the accountant has asked you to help with the tax preparation needs of Palo Alto, Inc. Palo Alto is a newly formed hi-tech company that specializes in manufacturing security chips for credit cards. The controller of Palo Alto, Michael Smith, would like your help with the following: (1) Palo Alto is considering purchasing property in California to build its corporate headquarters. The land had previously been used by a...
Your company cafeteria has become a source of employee complaints. Your boss has asked you to...
Your company cafeteria has become a source of employee complaints. Your boss has asked you to conduct a survey of the staff’s feelings of the cafeteria and write a report based on the results, including recommendations for improvements if necessary. Use your imagination to fill in the details.
You are asked to compute the free cash flows for a project with a duration of...
You are asked to compute the free cash flows for a project with a duration of 4 years. You receive the following relevant selected information: 0 1 2 3 4 5 Sales - 22.97 22.97 22.97 22.97 - Costs of goods Sold - 12.72 12.72 12.72 12.72 - Unlevered Net Income −6.56 4.71 3.45 7.35 3.96 −1.77 Depreciation - 2.95 2.95 2.95 2.95 2.95 In addition you know that 15% of sales and costs of goods sold are entering and...
1. Company X has an employee who is paid weekly. For Company X the FUTA tax...
1. Company X has an employee who is paid weekly. For Company X the FUTA tax rate is 6%. The limit for FUTA is $7000 of employee annual earning subject to the applicable tax. The employee earns $1000 for the week and has cumulative earnings year to date through the previous week of $6500. How much is deducted from the employee’s weekly paycheck for FUTA? A. -60- B. 30 C. 600 D. 300 E. None of the above 2. For...
Compute the mean weekly wages of the 65 employs working in a factory from the given frequency table, using the coding / short cut method?
Compute the mean weekly wages of the 65 employs working in a factory from the given frequency table (X is in K =1000's), using the coding / short cut method?
Compute the payment for year 2 for the following adjustable rate mortgage. The loan has an...
Compute the payment for year 2 for the following adjustable rate mortgage. The loan has an annual adjustment period, is indexed to the one-year Treasury Bill, and carries a margin of 2%. The original composite rate was not a teaser and was equal to 4%. The one-year T-bill rate decreased 0.5% at the start of year 2. The loan was 80% loan-to-value on a property worth $220,000, and it was fully amortizing over a term of 30 years.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT