Write a C program that will calculate the gross pay of a set of employees
$10-30 USD
Selesai
Dibuat sekitar 10 tahun yang lalu
$10-30 USD
Dibayar ketika dikirim
Write a C program that will calculate the gross pay of a set of employees.
The program should prompt the user to enter the number of hours each employee worked. When prompted, key in the hours shown below.
The program determines the overtime hours (anything over 40 hours), the gross pay, and then outputs a table in the following format. Column alignment, leading zeros in Clock#, and zero suppression in float fields is important. Use 1.5 as the overtime pay factor.
--------------------------------------------------------------------------
Clock# Wage Hours OT Gross
--------------------------------------------------------------------------
098401 10.60 51.0 11.0 598.90
526488 9.75 42.5 2.5 426.56
765349 10.50 37.0 0.0 388.50
034645 12.25 45.0 5.0 581.88
127615 8.35 0.0 0.0 0.00
You should implement this program using the following structure to store the information for each employee.
/* This is the structure you will need, feel free to modify as needed */
struct employee
{
long int id_number;
float wage;
float hours;
float overtime;
float gross;
};
In your main function, define an array of structures, and feel free to initialize the clock and wage values in
your array declaration.
Use the following information to initialize your data.
98401 10.60
526488 9.75
765349 10.50
34645 12.25
127615 8.35
Create an array of structures with 5 elements, each being of type struct employee. Initialize the array with the data provided and reference the elements of the array with the appropriate subscripts. Like the previous homework, use multiple functions in your answer and continue to use constants as needed. The only array you need is the array of structures, you don't need to create a separate array for clock, wage, hours, ot, and gross. You can either pass the entire array of structures to each function, or pass values that work on one array element (and its associated structure members) at a time ... either will work.
Hello dgigga! I can provide you a solution within an hour. The code will be well-documented and easy to read. I will be available for any questions or clarifications needed.
$15 USD dalam 1 hari
0,0 (0 ulasan)
0,0
0,0
16 freelancer menawar dengan rata-rata $28 USD untuk pekerjaan ini
Hi, I am Moeen, I have 2 year experience in C,C++ and Java programming. I have completed many projects before.I have read the description provided and I can assure you that will be able to complete this project on time. Thanks
Hi,
it looks simple. I think I need a couple of hours to do that. By the way, should data initialization you mentioned be done in the source code(hard-coded) or from a file? I will be glad to help you if you select me.
Best regards,
The program is finished, I can deliver it to you now. :)
It works as explained by the example, it takes the number of hours as the input and outputs exactly the same grosses and overtime hours. It can be easily adapted to your needs too.
It looks like some homework assignment I did on my first year of Computer Science degree (not finished yet).
I took an advanced C class, and my final grade was 97%.
So this would be an easy one to get me started on this site.
Feel free to email me, I usually answer right away (if I'm not asleep :-))
I have good experience programming in C for years in an academic environment and I have done a lot of projects like this one. I can finish this and deliver in 24 hours. I hope to hear from you