Program to compute gross wages for employee using array

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

Write a program that uses the following arrays:

* empId: an array of seven long integers to hold employee identification numbers. The array should be initialized with the following numbers: 5658845, 4520125, 7895122, 8777541, 8451277, 1302850, 7580489
* hours: an array of seven integers to hold the number of hours worked by each employee
* payRate: an array of seven floats to hold each employee's hourly pay rate
* wages: an array of seven floats to hold each employee's gross wages.

The program should relate the data in each array through the subscripts. For example, the number in element 0 of the 'hours' array should be the number of hours worked by the employee whose identification number is stored in element 0 of the 'empId' array. That same employee's pay rate should be stored in element 0 of the payRate array.

The program should display each employee number and ask the user to enter that employee's hours and pay rate. It should then calculate the gross wages for that employee (hours times pay rate), which should be stored in the 'wages' array. After the data has been entered for all the employees, the program should display each employee's identification number and gross wages.

Input Validation: Do not accept negative values for hours or numbers less than 6.00 for pay rate.

Reference no: EM1371939

Questions Cloud

Calculating the optimal output in an oligopoly market : Assume that Saudi Arabia lets other members of OPEC sell all the oil they wish at the existing price which udis set and other members accept.
Identify the operational definitions : Identify the operational definitions in the following statements and describe what, if anything, may be wrong with them: (1) smoking is bad for people's health
Write down program which declares integer variables : Write down complete program which declares the integer variable, reads value from the keyboard into that variable, andwrites to standard output variable's value, twice the value.
Computing optimal level of input required : Suppose ZCorp has following short run production function Q = 50X - 2X^2 where X is the only variable input used by ZCorp to product its product, Q.
Program to compute gross wages for employee using array : Write program which uses the following arrays: payRate: array of seven floats to hold each employee's hourly pay rate. wages: array of seven floats to hold each employee's gross wages.
Reward system and financial reporting act : Would the reward system vary among retailers, manufacturers, distributors, financial organizations? What other characteristics should good performance incentives have?
Explain the term stereotype threat : Explain what the term "Stereotype Threat" that happens to an individual of a different cultural when they are trying to take an IQ test.
Write down script to report cumulative size of all files : Write down script which will report cumulative size of all files in and below given directory. Your script will also report name and size (in bytes) of largest file with that directory tree.
Fallacies and consequences-race and ethnicity : Reflect upon the Individualistic Fallacy, Legalistic Fallacy, and Ahistorical Fallacy. Relate these fallacies to the information you learned from the video. Why might these fallacies exist? What are the consequences of these fallacies?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Program to declare array alpha of components of type int

Write C++ statements to do the following: Declare an array alpha of 15 components of the type int. Output the value of the tenth component of the array alpha.

  Iterative programming problem solving approaches

Write a recursive function void reverse ( ) that reverse a sentence

  Write a matrix multiplication program

Write a C++, matrix multiplication program which you can instrument to monitor and measure execution time as a function of problem size. Make sure it works in Microsoft Visual Studio.

  Program to compute diameter in centimeters of a steel rod

Write a program to compute the diameter in centimeters of a steel rod, an aluminum rod, and a copper rod, which can withstand a particular compression load.

  Execute tests and repetitions

Read data from standard input and store them in an array, Execute tests and repetitions

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Array of integers declared-initialized to number of tickets

Array of integers named parkingTickets has been declared and initialized to number of parking tickets given out by city police each day as beginning of current year.

  Grocery store program

This program draws upon several concepts that were covered in CptS 121 and should serve as a good refresher for CptS 122. Our store, Cougar Mart, maintains its inventory in a text file. Not being very tech savvy, the owner of Cougar Mart needs you to..

  Create a program that maintains the required book catalog

Create a program that maintains the required book catalog for the circulation desk of a library.

  Write c program which compute acceleration of jet fighter

Write a C++ program which compute the acceleration (m/s 2) of jet fighter launched from aircraft-carrier based catapult, provided jet's takeoff speed in km/hr

  Write program that stores the numbers in array

Write a c++ program that stores the following numbers in the array named miles: 15,22,16,18,27,23, and 20. have your program copy the data stored in miles to another array.

  Public transport fare ticketing system

Implement and test a public transport fare ticketing system.

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