Write a c program that will calculate the gross pay

Assignment Help C/C++ Programming
Reference no: EM13764086

Write a C program that will calculate the gross pay of a set of employees.

For each employee the program should prompt the user to enter the clock number, wage rate, and number of hours as shown below.

The program determines both the overtime hours (anything over 40 hours) and the gross pay, and outputs the following format. Hours over 40 are paid at time and a half.

Clock# Wage Hours OT Gross

098401 10.60 51.0 11.0 598.90

In the example above, since the employee worked 51 hours, 11 of those hours are overtime and are paid at time and a half. The first 40 hours are paid at the standard time using the hourly wage rate. If no overtime hours are worked, just indicate 0.0 hours in your output.

Column alignment, leading zeros in Clock#, and zero suppression in float fields are important.

With this and in future assignments, please start using constants. For example, instead of hard coding a value for 40.0, use a constant:
#define STD_HOURS 40.0

Replace 40.0 in your code with the symbolic constant STD_HOURS

There are a few other constants you should define and use for this assignment. Use at least one more constant in your homework.

Use the following data as test input:

Clock# Wage Hours 98401 10.60 51.0 526488 9.75 42.5 765349 10.50 37.0 34645 12.25 45.0 127615 8.35 0.0

 

Reference no: EM13764086

Questions Cloud

Computation of present value : Using the appropriate interest table, compute the present values of the following periodic amounts due at the end of the designated periods.
Distinguishing feature of a common law legal system : Which of the following is a distinguishing feature of a common law legal system
Discuss the main parts of the auditor report : Discuss the main parts of the Auditor Report for the company (list the 8 parts for audit report and match them with your selected auditor report).
Define a car structure type : For this assignment you will write a program that determines which of a set of rental cars the user can rent for a user-specified rental rate. The rental car data is contained in a text file which will be fed into your program using stdin redirect..
Write a c program that will calculate the gross pay : Write a C program that will calculate the gross pay of a set of employees. For each employee the program should prompt the user to enter the clock number, wage rate, and number of hours as shown below.
Find economies of scope : Find economies of scope. Provide examples of specific actions Harley-Davidson's managers could take to reduce expenses or share activities through horizontal relationships across brands.
History of women and minorities in policing : History of Women and Minorities in Policing
Revenue expenditures and capital expenditures : Write a 400 - 700-word summary explaining the differences between revenue expenditures and capital expenditures during a useful life and identifying any similarities. Briefly explain the entries of revenue expenditures and capital expenditures.
Do you recollect emotion in tranquility : Given Eliot's Modernist argument with Wordsworth the Romantic, where would you position your poem? Do you write from strong emotion? Do you recollect emotion in tranquility, or are you a cold craftsman?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write c program that will input two values from the user

write c program that will input two values from the user with a prompt ? that are a value and a base with which you

  A program computes and displays the number of centimeter

The Earth's ocean levels have risen an average of 1.8 millimeters per year over the past century. Write a program computes and displays the number of centimeters and number of inches the oceans rose during this time.

  Contains a design with a while loop

This problem contains a design with a while loop. Assume that sum references a doubleword in the data segment and that count is in the ECX register. Give a fragment of 80x86 assembly code that implements the design.

  C++ programs that compute the agreement for two vectors

In this assignment, you write C++ programs that compute the agreement for two given vectors (see Calculation 1 above). In these programs, in vectors A and B only nonzero elements (elements that are 1) are stored. We give you a function that gen..

  Prepare a businesspartner

Prepare a BusinessPartner class that contains a company name, first name and a telephone number.

  State diagram to recognize one form

Design a state diagram to recognize one form of the comments of the C-based programming languages, those that begin with /* and end with */. and also Write and test the code to implement the state diagram.

  Css training program

What are the training objectives for the CSS training program? Indicate how these objectives are tied to the KSA requirements. Assume that all trainees have college degrees but need KSAs in all other areas listed in the qualifications section.

  What is the purpose of the function header

Please note that the program must be zipped and contain all necessary files, not just the code. I will need to open the full program and test it in VISUAL BASIC C++.

  Make an explicit statement of the invariant of the set class

Prepare a new container class called ser, which is similar to a bag, except that a set can contain only one copy of any given item, you'll need to change the interface a bit.

  Prepare a program to find out the perfect numbers

Write a program in C++ that outputs all perfect numbers and their factors from 1 to 1000 using your own created function - Prepare a program to find out the perfect numbers and it must compile with no errors and follow the directions.

  Determine the meaof the numbers in the array

Determine the mean(average) of the numbers in the array, and output the reslt. Use a subprogram to input the numbers, a function to find the mean.

  During the execution of the above code, how many instru

(a) During the execution of the above code, how many instructions are executed? (b) Assuming a standard unicycle machine (CPI = 1) running at 100 KHz, how long will the above code take to complete?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd