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

  You will implement a simplified version of the set class

you will implement a simplified version of the set class. you must implement all functions defined in the provided file

  Parallel numeric arrays

Create and code a program that uses three parallel numeric arrays of size 6. The program searches one of the arrays and then displays the corresponding values from the other two arrays.

  Difference between a constant pointer

Explain the difference between a constant pointer to non-constant data and a non-constant pointer to constant data. Show the syntax to declare them.

  Amanda and tyler opened a business

Amanda and Tyler opened a business that specializes in shipping liquids, such as milk, juice, and water, in cylinderical containers. The shipping charges depend on the amount of liquid in the container. (For simplicity, you may assume that the con..

  Classes and objects are the basic concepts of

question 1. list three debugging techniques within the debugger that can be used to locate logical error in the java

  Refresher on andys basic requirements

The game Battleship is back and better than ever. Instead of hacking everything together in C, you will instead leverage C++ and all of your newly gained object oriented programming knowledge to construct a much cleaner end product.

  Write a small program scropy

You are supposed to write a small program scropy, which takes two arguments on the command line: the names of a source file and a destination file.

  Called cbankaccount

Create a base class, called CBankAccount, and two additional classes (each derived from CBankAccount), called CSavingsAccount and CCheckingAccount.

  Display your name in the title bar

Display your name in the title bar of the browser, declare the DOCTYPE for HTML5, and create a comment listing the lab number, the author, and the date.

  Input parameters, and returns nothing

Write a function called ten2one(), that takes no input parameters, and returns nothing (void). The body of the function must include a loop that counts from 10 down to 1, printing the count value each time in the loop. The output should look like (no..

  Struct definition as the page table entry

Struct definition as the page table entry and the array that follows it as the page table. Implement the software simulation of least recently used algorithm in two C++ functions. Should RUN on UNIX.

  Multiple choice question on c programming

Create a function to print "88 is a great port number" function name is yourName_PrintFunction no input no return type print "88 is a great port number"

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