Make a c program that will calculate the gross pay

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

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

Questions Cloud

What is the implied one-year rate two years from now : Two-year 10% coupon $1,000 par bond selling for $1,000 Assume that the expected theory for the term structure of interest rates holds, no liquidity premium exists, and the bonds are equally risky. What is the implied one-year rate two years from n..
Calculate the density and specific weight of carbon dioxide : calculate the density and specific weight of carbon dioxide at a pressure of 300 kN/m^2 absolute and 60º C
Find the factor by which kinetic energy of ball increases : A ball and bat, approaching one another each with the same speed of 1.1 m/s collide. Find the speed of the ball after the collision. find the factor by which the kinetic energy of the ball increases
How would each of these plans affect earnings per share : How would each of these plans affect earnings per share? (Round your answers to 2 decimal places. Omit the "tiny_mce_markerquot; sign in your response.)
Make 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.
What is the smallest particle size that will be removed : What is the smallest particle size (density 2.65 g/cm3) that will be removed in a horizontal grit chamber 10 m long and 1.0 m deep if the flow rate is 1000 m3/hr. Assume the temperature of the water is 25°C.
Obtain the wave number : A wave on a string is described by D(x,t) = (1.2 cm)sin[2 pi (x/(3.9 m) + t/(0.4 s) + 1)], where x is in m and t is in s. What is the wave number
How would friction factor and pressure change be affected : Water at 20ºC flows at a velocity of 2 m/s in a 200-mm diameter horizontal ductile-iron pipe. a) Estimate the friction factor in the pipe, and state whether the pipe is hydraulically smooth or rough
Program revenues-general government-operating grants : General journal for governmental activities at the government-wide level - Program Revenues-General Government-Operating Grants and Contributions

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a menu driven program for an online beef

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

  Write code that declares an int array named month

Write code that declares an int array named month with 5 rows and 7 coloumns and initializes every element to -1.

  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 class volumeofbox that calculate the volume

write a class VolumeOfBox that calculate the volume by this formula : length * breadth *

  Write a full program that implements the aggregation concept

Write a full program that implements the aggregation concept for the Mail Message, Header , Body and Attachment classes.

  Use selection sort to sort a[48] into increasing order

Use selection sort to sort A[48] into increasing order, and then print out the sorted list in four rows. There may be duplicates, but that's OK. (65 and 53 appear twice.) Duplicates will appear next to each other in the sorted list.

  Find the pairs in any given matrix

write a c program which will find the pairs in any given matrix, whose sum of pairs are 10.

  Write a c function to convert gallons-quarts-pints and cups

Write a C function named liquid() that is to accept an integer number and the addresses of the variables gallons, quarts, pints, and cups.

  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

  You are the admissions office at abc medical university

You are the Admissions Office at ABC Medical University. You have a large number of applicants for a very few number of available openings at your school. As a result, you need to set some high admission standards. To be accepted, a student ..

  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

  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..

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