Calculate the gross pay of a set of employees

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

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

Reference no: EM13186055

Questions Cloud

Compute the minimum mass of hexane that could be left : Calculate the minimum mass of hexane that could be left over by the chemical reaction. Be sure your answer has the correct number of significant digits.
The incidence of down''s syndrome : The incidence of Down's Syndrome (typically due to an extra copy of chromosome 21) increases with the age of parent, and increases dramatrically for women having children after teh age of 35.
Compute the maximum mass of carbon dioxide : Calculate the maximum mass of carbon dioxide that could be produced by the chemical reaction. Round your answer to significant digits
Relationship between private and public police : Discuss how the conflict regarding the definition of public and private space influences the relationship between private and public police.
Calculate the gross pay of a set of employees : 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
Aqueous hydrobromic acid react with solid sodium hydroxide : Aqueous hydrobromic acid will react with solid sodium hydroxide to produce aqueous sodium bromide and liquid water . Suppose 36.4 g of hydrobromic acid is mixed with 5.9 g of sodium hydroxide.
What is not a social insurance program : women and selected minorities are systematically excluded from high-paying occupations and crowded into low-paying occupations, decreasing their wages and reducing domestic output. B. employers having high discrimination coefficients will be crowde..
In psychology-the study of personality focuses on what : In psychology, the study of personality focuses on what?
Find the number of combinations : Find the number of combinations that can be made from 9 objects taken 3 at a time.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program that stores the number

Write a program that stores the following numbers in the array named miles : 15, 22, 16, 18, 27, 23, 20. Use a pointer to copy the data stored in miles to another array named dist and then display the values in the dist array.

  Find the sixth maclaurin polynomial for sin x

Find the sixth Maclaurin polynomial for sin x and use Chebyshev economization to obtain a lesser-degree polynomial approximation.

  Create a simple command line program that simulates

Instructions:  Create a simple command line program that simulates the rolling of a pair of six sided dice a user given number of times

  State private portion of class to model the item

In c++ state the private portion of a class to model the given item: a class Date for dates consisting of a month, day and year. a class PhoneNumber for a telephone numbers consisting of area code, local exchange, and number.

  C assignment of curl library

C Assignment Curl library must be used To be done on linux, it should be compiled using the following command: gcc -Wall -ansi -pedantic NameOfFile.c -lncurses Please make sure it is commented with clarification Variable names in camel case

  Write a menu driven program for an online beef

Write a menu driven program for an online beef distribution company. There are 8 different

  Emulates the behavior of a bus

Write a program that emulates the behavior of a bus. The bus must have a schedule ( a finite number of times for it to stop) and a certain capacity (number of passengers). In this program the bus has two states: stopped and going.

  Translate than c source code

Why does Ada take so much more time to translate than C source code? What phase of the Ada translation takes the longest?

  Users to input two forces by their components

write a programm to ask users to input two forces by their components of (Fx1,Fy1) and (Fx2,Fy2) from the keyboard.call twice the function to display both magnitude and direction angle of two forces on the screen.add two forces and display both magni..

  Write a program which accepts the total of food and drink

Write a program which accepts the total of food and drink purchased for a restaurant bill as input. The output should be adjusted bill with a sales tax of six percent 6% and a tip (gratuity) of 15%.

  Implement a standard sorted linked list class

Write C++ Program:Implement a standard SORTED linked list class. Be sure to include constructor/copy constructor, destructor, and assignment operator overload.

  The fibonacci sequence

In the novel "The DaVinci Code", a scrambled version 13, 3, 2, 21, 1, 1, 8, 5 of the first eight Fibonacci numbers appear as one of the clues left by murdered museum curator Jacques Sauniere. In this assignment, we will do something related to t..

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