Program to calculate weekly pay for employees.

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

I am looking for help with my class assignment for C Programming. I need to write a program that will calculate weekly pay for employees.

For each employee the program should prompt the user to enter the clock number, wage rate, and number of hours. The clock number is a unique identifier for an employee, the wage rate is the hourly rate the employee is paid, and hours is how many hours an employee worked within a given week. The program determines the gross pay and outputs the following

format:
-----------------------------------
Clock# Wage Hours Gross
-----------------------------------
098401 10.60 51.0 540.60

Column alignment, leading zeros in Clock#, and zero suppression in float fields are important. Remember that you cannot type in 098401 (its Octal, and invalid as well) ... type in as 98401 and use print formatting to print as 098401. Assume that clock numbers are at a most 6 digits long, and pad with leading zeros if less than 6 digits.

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

The program should query the user for how many sets of test data (i.e., employees to process), and loop that many times. In our example above, you would enter the number 5, as there would be 5 employees to process.

Don't expect a nice output that shows all the employee data in a one table. Its OK to have your output show the prompts for data on the first employee, print information about that employee, prompt for information about the next employee, print info on that next employee, and so one until each employee data set is processed.

You will run this program ONE time as stated before, and you will initially prompt the user for the number of data sets to process (such as 5) that you will incorporate into your loop test.

Reference no: EM13938808

Questions Cloud

What will happen to your companys cash cycle : Your firm has an inventory period of 45 days, an accounts payable period of 22 days, and an accounts receivable period of 28 days. The CFO wants to implement a discount plan in order to reduce the receivables period to 18 days. What will happen to yo..
Summary methods to describe the bank data : Select a random sample of size 50 from the given 1000 cases. You will use this sample data to complete tasks 2 to 6. Since repeat cases may occur when you draw random numbers and each case can be included only once in your sample, some of you may..
Compute depreciation expense and accumulated depreciation : Compute depreciation expense, accumulated depreciation, and book value for the first three years of the machine's life using the straight-line method and the double-declining-balance method.
What is amount of the annual depreciation tax shield : Northern Lights is trying to decide whether to lease or buy some new equipment. The equipment costs $51,000, has a 5-year life, and will be worthless after the 5 years. The company has a tax rate of 34 percent, a cost of borrowed funds of 8.75 percen..
Program to calculate weekly pay for employees. : I am looking for help with my class assignment for C Programming. I need to write a program that will calculate weekly pay for employees.
Recommending an overseas market : You are required to develop a report proposing a new overseas market which an organisation should enter or alternatively an existing overseas market where significant expansion should be implemented.
Prepare depreciation schedule using sum-of-the-year method : The price of a laser printer purchased by Paul's Printers and Office Supplies was $713. It cost $27 for delivery. The salvage value at the end of a 5-year life is $65. Prepare a depreciation schedule using the sum-of-the-year's method, and then enter..
New york via commercial airplane : The following U.S. border entry points: New York via commercial airplane Detroit via commercial transport truck highway Vancouver to Seattle via intercity passenger train
Improve processes and activities in organisation : What motivates you to succeed at your work? How do you define a productive day? What things do you consider important in motivating and involving people in organisational change? What steps would you use in managing people to improve processes and..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Goto statements to explicitly

Rewrite the following program fragment using goto statements to explicitly show the flow control through the loop.

  Flipflaps - game based on pancake sorting

The project is to design and write a C++ 11/FLTK game program with a graphical user interface.The game is based on "pancake sorting,", which actually has some mathematical significance.

  What is the value of the expression

following are the simple question.What is the value of the expression  1000 /10 /10 + 100 %1.What is the output printf("%c",65)What is the output {int i=10;printf("%d",10/i++);}.

  Modify the program in 6a so that, in addition to the cents

Modify the program in 6a so that, in addition to the cents, the user enters the denomination of the coin to which to convert the pennies, such as 5 for nickles or 25 for quarters.

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Simulate a game of blackjack

Design and implement a C++ program to simulate a game of Blackjack between two to four players. Your program must incorporate a two-dimensional array to represent the suit and the value of each card dealt to a player

  Write a function that takes an integer array

1. Write a function that takes an integer array and the array's size as parameters. The function will check if the array is sorted. If it is, it will return a 1. If it is not sorted it will return 0. The function should not  sort the array.

  Write a program for a college admissions office

Write a program for a college admissions office. The user enters a numeric high school grade point average (Ex 3.2), and an admission test score. Print the message "Accept" if the student meets either of the subsequent requirements:

  Using songs.dat in our folder

Using songs.dat in our folder on the P: drive, construct a playlist of 10 random songs. Use a struct to hold the song data (name and time in seconds), and output the playlist (song name and time,

  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

  Program to hack a simple account

it should entail how to get the password of such an account.

  C program to solve the quadratic equation of rocket launch

Write a C program to solve the quadratic equation of rocket launch by computing the roots (t1 and t2) of that quadratic equation: gt2 + vt + l = 0 (or) for simplicity ax2 + bx + c = 0. Get the values of g, v, and l from the user. The program should d..

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