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