Write a c program that will calculate the gross pay of a

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

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

Questions Cloud

Professional ethics play a vital role in the computing : professional ethics play a vital role in the computing profession. the conduct of it professionals influences many
One of the needs that your client has is a databaseto : one of the needs that your client has is a database.to design a database a database planner should spend a considerable
The topic computer securityintroductioni will discuss : the topic computer securityintroductioni will discuss computer security in this paper as well as aspects in ethical
A multinational tour operator agency has gained new : a multinational tour operator agency has gained new business growth in the north american market through the use of
Write a c program that will calculate the gross pay of a : write a c program that will calculate the gross pay of a set of employees.for each employee the program should prompt
Q1consider the following codedefine add1-iter a-listnbsp : q1consider the following codedefine add1-iter a-listnbsp define add1-helper curr-list result-listnbspnbspnbspnbspnbsp
1 draw a plan of a typical strip mine showing all : 1. draw a plan of a typical strip mine showing all operational features and equipment.2. answer the followinga. why is
Part a a brawl in mickeys backyardread the discussion case : part a a brawl in mickeys backyardread the discussion case a brawl in mickeys backyard question 1 in a chart diagram or
Modern automotive paint plants use water-bornefinishes to : modern automotive paint plants use water-bornefinishes to minimize the emission of volatile organiccompounds vocs from

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program that reads from a file a list of course name

Write a program that reads from a file a list of course names, letter grades for each course and number of credits each course is worth. The program will read each course name, grade earned and number of credits from the file and print out the course..

  Write a program that converts each name

You are given a file consisting of students? names in the following form: lastName, firstName middleName. (Note that a student may not have a middle name.) Write a program that converts each name to the following form: firstName middleName lastNam..

  What''s a more efficient way to write

What's a more efficient way to write this function for a matrix? This one has to go through all the numbers, but that would take too long. r_num is row and c_num is column

  Before each sort, write psudo-code

Ceate a single cpp ?le (FILE=MAIN2.cpp) containing all three elementry sorts(bubble, insertion, selection). Before each sort, write psudo-code and invarient analysis of the sort in block comment style. Add the code from 3.). Generate a list of 100..

  Write a script that creates a craps game

Write a script that creates a craps game and meets the following requirements. Name the script craps.sh The script will get 2 random numbers between 1-6.

  Program to find the factors

Write a c++ program to find the factors of an integer (entered by the user) which are themselves squares.

  Write c program that prompts for variable number of integers

Write a C program that prompts for a variable number of integers, adds them up, averages them, and prints out the average.

  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.

  Program that initializes a 3x4 array

Write a program that initializes a 3x4 array with test data. It then asks the user for a number input, and checks if the number is present in the array

  First display the smallest volume and then the largest volum

first display the smallest volume and then the largest volume.

  You are the admissions office at abc medical university

You are the Admissions Office at ABC Medical University. You have a large number of applicants for a very few number of available openings at your school. As a result, you need to set some high admission standards. To be accepted, a student ..

  Program to store lists of names and ages in parallel arrays

Write a C++ program that stores lists of names (the last name first) and ages in parallel arrays and sorts the names into alphabetical order keeping the ages with the correct names.

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