Evaluates the gross pay of a set of employees

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

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: EM13190068

Questions Cloud

Permanent dentition in orthodontics : Is there any study material regarding thesis on biometric study of tooth size in normal,crowded nd spaced permanent dentition in orthodontics
Explain the differences in properties and triethylamine : Triethylamine, (ch3ch2)3n, is a liquid that boils at 89C and has a viscosity of about 4 x10^-4 kg/ms. Explain the differences in properties of these two componds.
Explain the statistical analysis : Explain the statistical analysis that you completed in Part I. Be sure to explain where the data came from, what analysis was done, and what the results were.
Relative vertical position in the water column : Oceanographers name currents and large bodies of water according to their relative vertical position in the water column. which one of the following is the water mass that resides below 1,500 meters (5000 feet) to a depth of about 4,000 meters (13,00..
Evaluates the gross pay of a set of employees : Write a C program that will calculate the gross pay of a set of employees - determines both the overtime hours (anything over 40 hours) and the gross pay, and outputs
What is the per-worker production function : Assuming no population growth or technological progress, find the steady-state capital stock per worker, output per worker, and consumption per worker as a function of the saving rate and the depreciation rate.What is the per-worker production fun..
Explain examples are brcl and ibr and brfand clf : Examples are BrCl, IBr, BrF, and ClF. Which compound is expected to have the highest boiling point aqt any given pressure? Please explain why
Why other bases might be better in certain circumstances : We also discussed rotations of common shapes in the plane using a change-of-base. Walk through one or two examples and discuss how the "usual" basis {(1,0) and (0,1)} can be limiting. Does this suggest why other bases might be better in certain ci..
Engine assembly plant and motorcycle assembly plant : HD has its engine assembly plant in New York and its motorcycle assembly plant in LA. Engines are transported between the two plants using trucks, with each trip costing $1,000. The motor plant assembles and sells 300 motor each day. Each motors cost..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program using one while loop

Write a program using one while loop that will read in a sequence of integers guaranteed to be within the inclusive range of 0 through 99,999 from the user

  A company that market is publishing both book and audio cass

A company that market is publishing both book and audiocassette versions

  Insert the missing code in the c program

You are to insert the missing code in the C program given for combinational equivalence checking. This program will interface with the CUDD package and will parse netlist files in ISCAS85 circuit format. Next, BDDs will be created for each circuit an..

  Using opengl to create a cube

Write a program in C/C++ using OpenGL to create (without using built in function) a cube by implementing translation algorithm by translating along 1. X-axis, 2.Y-axis and 3. X and Y plane

  Ohio phonebook has gotten mixed up

In an accident, the Ohio phonebook has gotten mixed up. The names are now really out of order. You and your enthusiastic, but naive, assistant Carl must fix the problem. No one can use the phonebook while you are sorting it, so every extra second of ..

  Build a definition for a class that stores data

Using C++ language, build a definition for a class that stores data about a two dimensional vector. The class has to have mutators and accessors to get and set the x and y values. Make x and y integers. Then overload the operator * so that it retu..

  Using virtual methods, organize the animals

Using virtual methods, organize the animals in a small zoo, having as guests lions, parrots, alligators, penguins, elephants, cobras, zebras, hawks, turkeys and rabbits.

  Write a recursive definition in sml to reverse

Write a recursive definition in SML to reverse a list of elements and multiply all elements with 2.

  Design a class named employeerecord

Design a class named EmployeeRecord that holds an employee's ID number, name, and payrate. Include mutator methods to set the values for each data field and output the values for each data field. Create the class diagram and write the code that

  Write in c++. read an inputfile.txt

write in C++.  read an inputFile.txt which contains integers that are virutal addresses, and I am suppossed to translate that into physical addresses using a page table and a transition lookaside buffer

  Random permutations

Write a program in C++ that gives a prompt to the users, asking for an integer M.It then prints out a M different random permutations, one on each of M lines, of the numbers 1, 2, ... , 10, separated by spaces or tabs.

  Calculate the total of a purchase from a farmer''s market

You will develop a program that can calculate the total of a purchase from a farmer's market that sells apples, bananas, and oranges. At this particular market, apples are $1.99/lb., bananas are $0.99/lb., and oranges are $1.50/lb. Users should be..

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