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 menu-driven program that maintains an address book

Write a menu-driven program that maintains an address book using a linked list. The address book must supports the following operations

  Create a program that outputs the result of the formula

Create a program that outputs the result of the formula f = (a - b)(x - y) using the printf() functions.

  Write function that calculates the pay amount

Write a second function that calculates the pay amount. If the salesperson owes money, the return amount from the function is a negative number.

  Computing value of the return statement

In the following code snippet, what is the value of the return statement for x = 4 and n = 4? int foo(int x, int n)

  Dealerships are awarded the rebate

Dealerships are awarded the rebate on a quarter-by-quarter basis, only for quarters where their actual sales exceeded expected volumes for that quarter. Expected sales volumes for each quarter are as follows:

  How to call a function from main

Call a function from main(), passing one value to it. Return TWO values, both the square of the number and the number to the power of three.

  Implement a program to process a weighted undirected graph

Read in the number of vertices V and the number of edges E of the graph followed by its E edges, each in the form u, v, w where 1 0 representing an edge uv with weight w.

  Write a program that allows user to input students names

Write a program that allows the user to input the students' names followed by their test scores and outputs the following.

  Write a program that uses a loop to display projected rates

Write a program that will convert US dollar amounts to Canadian dollar (1 CND = 0.92 USD). Format your currency amounts in two decimal places and trailing zeros.

  Write a program to analyze students course marks

Write a program to analyze students course marks. The program should read in students course marks from "m2-grading.txt". The data file has a headline including students ID#, course-1marks, course-2 marks and course-3 markes.

  Prepare a program to add the specific numbers

Write a program that will read in 5 numbers and add 10 to the first number, 20 to the second number, and 30 to the third number, 40 to the fourth and 50 to the 50th.

  Assign passed value to function to return value

Assign passed value to this member and another function to return value. Your main should read the integer from an input data file, and write the output to the output data file.

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