Calculate the gross pay of a set of employees

Assignment Help Computer Engineering
Reference no: EM132194671

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. At a minimum, I would recommend at least adding a new variable to store your overtime hours. If you wish, you could optionally create variables for overtime_pay and standard_pay, that would be up to you.

Students in the past have done it both ways. 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

Do not use any material from any chapters we have not yet covered (such as adding your own functions, arrays, structures, pointers ... we'll get to them in the future), unless we have discussed them in the lectures notes or on-line discussions.

The program should continue to query the user for how many sets of test data there are, and loop that many times. Start with your graded homework 1 assignment and modify the code as needed for this homework.

Reference no: EM132194671

Questions Cloud

Calculate the monthly cost of a house given selling price : Write a C++ program to calculate the monthly cost of a house given the selling price, annual rate of interest, and number of years for the loan.
Market for housing as a result : Suppose that consumers begin to believe that the price of housing will be lower next period. What will happen in the market for housing as a result
Write a c program that compiles and runs without errors : Write a C program that compiles and runs without errors or warnings. This program has a bunch of little bit-manipulation functions in it.
Compute how many seconds are in 20 years : Write a C# program to convert one billion seconds (1,000,000,000 seconds) into years, months, days, hours, minutes, and seconds, using visual studio.
Calculate the gross pay of a set of employees : Calculate the gross pay of a set of employees. For each employee the program should prompt the user to enter the clock number.
Find increase in temperature for a thermally insulated chunk : Radioactive decay of granite and other rocks in Earth's interior provides sufficient energy to keep the interior molten, to heat lava, and to provide warmth.
Calculate an average of several integers entered by the user : Calculate an average of several integers entered by the user. It first prompts the user to enter the number of integers she wants to average.
Define and initializes three pointers : Display on the screen the addresses stored in those pointers each one in three different forms: octal, decimal and hexadecimal formats.
What are the two points of interest : A horizontal spring attached to a wall has a force constant of850 N/m. A block of mass 1.00-kg is attached to the spring andoscillates freely on a horizontal.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Is quality simply a matter of coordinating excellent

Is quality simply a matter of coordinating excellent organizational effort? Can quality be simplified to this degree? Or is quality about much more?

  Designing the flow chart

Draw a flowchart describing the following given situations: The data found on employee time cards are keyed onto the hard disk before they are processed by the computer.

  C program to implement sieve of erastosthenes

Prepare a C program which implements the Sieve of Erastosthenes and determines the primes among the first N integers that you enter through a prompt or the command line.

  Write a program that prompts store owner for amount of cash

Write a program that prompts the store owner for the amount of cash at the beginning and end of the day, and the name of the file.

  Explain what conditions need to in place for teams to excel

Discuss how to access team productivity. Explain what conditions need to be in place for teams to excel and why?

  Write a program to print the numbers

Write a program to print the numbers that do not appear in the Fibonacci series. The number of such terms to be printed should be given by the user.

  Describe the three methods for scheduling cpu allocation

Name and describe the three methods for scheduling CPU allocation for threads.

  List two examples of hardware features that are used

List two examples of hardware features that are used to help the OS perform its work. What are the advantages and disadvantages of relying on the hardware?

  Write an illustration of a nested if structure and build it

write a 200- to 300-word short-answer response to the followinga create an example of a nested if structure and build

  How many attempts on average are needed to find two persons

Ignoring the birth month, how many attempts, on average, are needed to find two persons with the same birth date? Assume that all months have 30 days.

  Create a function definition called addarray

Write down a function definition called addarray that takes two parameters- one an array as an int and the other an int that contains the number of elements of the array. The function would return the sum of the number of elements of the array as ..

  Write a test bench to simulate the given operation

Using Xilinx ISE, write and simulate a VHDL/Verilog description to correctly command the lights according to the occupancy of the parking lot.

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