Write a c program that calculate the gross pay of employee

Assignment Help C/C++ Programming
Reference no: EM13764515

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: EM13764515

Questions Cloud

Analyze the leadership styles of a senior executive : Analyze the leadership styles of a senior executive (CEO, CFO, COO, Director, etc.) in your current or previous organization who made a positive or negative impact on you.
The levels of measurement of variables : Discussion examining the appropriateness of the data displays (Strengths and weaknesses? Were they appropriate
Describes at least two ethical theories : Describes at Least Two Ethical Theories to Be Used for Analysis of the Business Situation
What are the social determinants of health : What are the social determinants of health and what factors determine the health of an individual, and how do they relate to the social determinants of health?
Write a c program that calculate the gross pay of employee : 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.
Business situation that presents a legal and ethical issue : Describes a Business Situation That Presents a Legal and Ethical Issue, Offers a detailed description of a business situation that presents a legal and ethical issue
What are the drawbacks of labeling : What are the reasons to and benefits of labeling or classifying children? What are the drawbacks of labeling? Should children ages 0-5 be exempt from labeling? Why or why not?
Collaboration systems at isuzu australia limited : Summarize the main reason(s) that prompted Isuzu Australia Limited (IAL) to use collaboration technologies. Identify the platform that IAL chose as an online portal and content management system, and describe the main reason(s) why IAL chose such ..
Business adviser for alba and gavigan : You are a business adviser for Alba and Gavigan. Describe a skimming price and a penetration price, and advise them whether they should charge a skimming price or a penetration price, with supportive reasoning for and against each pricing alter..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program for keeping a course list

Write a program for keeping a course list for each student in a college. The information about each student should be kept in an object that contains the student's name and a list of courses completed by the student.

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

  What does the term polymorphism mean

What does the term polymorphism mean? Provide an example.

  Implement uniform random number generator

Implement Uniform Random Number generator and Generate 1000 Random number between 0 an 10000.

  Create a boolean function that computes

Create a Boolean function that computes the value of a factorial for values up to including 10. Include comments about how to use the function and describing how it works.

  Q1nbspnbspwrite c statements to do the following1 declare

q1nbspnbspwrite c statements to do the following1. declare an array alpha of 15 components of the type int.2. output

  Class to act as a generic array

Create a class to act as a generic array (i.e. the user will be able to choose the data type to be stored by passing the appropriate template argument.

  Use the convention that all years have 360 days

In writing the days() function, use the convention that all years have 360 days and each month consists of 30 days. The function should return the number of days for any Date structure passed to it. Write a main () function to test your function.

  Complete the 8 queens 2 dimensional array

Complete the 8 queens 2 dimensional array program with backtracking. please change the below program using backtracking  and please run before posting it . the program suppose to print 92 solution . amd also comment before each line to better unde..

  Write a method named negative sum

Write a method named negativeSum that accepts a Scanner as a parameter reading input from a file containing a series of integers, and determine whether the sum starting from the first number is ever negative

  Dynamically allocates an array large enough

Write a program that dynamically allocates an array large enough to hold a number of test score. The size of the array should be input by the user

  Determine whether all elements of the list are distinct

Consider the subsequent decision problem: Given a list of integers, determine whether all elements of the list are distinct - Show that this question can be solved in polynomial time.

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