a C program that will calculate the gross pay

Question description

CHARACTER STRINGS
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.
This week, adding a Total and Average row is no longer optional, its required for this assignment:
a) Add a Total row at the end to sum up the wage, hours, ot, and gross columnsb) Add an Average row to print out the average of the wage, hours, ot, and gross columns
———————————————————
Name Clock# Wage Hours OT Gross
———————————————————
Connie Cobol 098401 10.60 51.0 11.0 598.90
Mary Apl 526488 9.75 42.5 2.5 426.56
Frank Fortran 765349 10.50 37.0 0.0 388.50
Jeff Ada 034645 12.25 45.0 5.0 581.88
Anton Pascal 127615 10.00 40.0 0.0 400.00
———————————————————

Total: 53.10 215.5 18.5 2395.84
Average: 10.62 43.1 3.7 479.19

You should implement this program using a structure similar to the suggested one below to store the information for each employee. Feel free to tweak it if you wish. For example, its OK to have a first and last name member instead of just a name member, and if you want to use different types, that is OK as well.
struct employee
{
char name [20];
long id_number;
float wage;
float hours;
float overtime;
float gross;
};
Use the following information to initialize your data.
Connie Cobol 98401 10.60
Mary Apl 526488 9.75
Frank Fortran 765349 10.50
Jeff Ada 34645 12.25
Anton Pascal 127615 10.00

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.

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Benefits of our college essay writing service

  • 80+ disciplines

    Buy an essay in any subject you find difficult—we’ll have a specialist in it ready

  • 4-hour deadlines

    Ask for help with your most urgent short tasks—we can complete them in 4 hours!

  • Free revision

    Get your paper revised for free if it doesn’t meet your instructions.

  • 24/7 support

    Contact us anytime if you need help with your essay

  • Custom formatting

    APA, MLA, Chicago—we can use any formatting style you need.

  • Plagiarism check

    Get a paper that’s fully original and checked for plagiarism

What the numbers say?

  • 527
    writers active
  • 9.5 out of 10
    current average quality score
  • 98.40%
    of orders delivered on time
error: