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

  Program to declare array alpha of components of type int

Write C++ statements to do the following: Declare an array alpha of 15 components of the type int. Output the value of the tenth component of the array alpha.

  Functions to compute stress and strain in steel rod

Write a main function and the following functions to compute the stress and strain in a steel rod of diameter D (inches) and length L (inches) subject to the compression loads P of 10,000 to 1,000,000 pounds.

  Project

Unit 3 Individual Project SSCI210 – 1304B – 01 A typical individual who commits who commits hate crimes whether it is against or aimed at the Gay/lesbian community , the persons of color or the Jewish community, ( I mention these three because they a..

  The grid is populated randomly

Initially, the grid is populated randomly with occupied and empty cells. Once the initial grid has been created, the program loops. Each iteration of the loop represents a tick or time step in the environment.

  To reverse the order of elements on a stack

Write a program in C++ to  reverse the order of elements on a stack S using two additional stacks using one additional stack

  Binary tree, print right view of it

Given a Binary Tree, print Right view of it. Right view of a Binary Tree is set of nodes visible when tree is visited from Right side.

  Design a deck plan space ship in eclipse

Develop a simple interactive two-dimensional spaceship deck plan editor using OpenGL and GLUT. Your program will enable a user to create and save a deck plan of a hypothetical spaceship comprising the hull walls.

  How do you generate arrays, random numbers

How do you generate arrays, random numbers and multiply and add rows, columns and diagonals in C

  Implemented a regular binary search tree

In Computer Science I, you implemented a regular binary search tree. Due to your busy schedule, you've decided that it would be best if you could simply reuse this code without any changes. You realize that your code would ONLY work for Arup's ass..

  Multiply a set of complex numbers

Write a C program to multiply a set of complex numbers stored in an array (that has been dynamically allocated). Specifically, first prompt the user to enter how many complex numbers need to be multiplied, dynamically create an array to store the ..

  Write a program that will read in 2 test score.

Write a program that will read in 2 test score. The instructor has decided to give each student 10 bonus point on each test. Print out each test score and the total after the bonus, the print the total number of points earned on the tests.

  Image text transcribed for accessibility

Image text transcribed for accessibility: write a program that requires the number of bits for the exponent and significant of a floating point representation, then requires two decimal real numbers and an operation,sum,subtraction or multiplic..

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