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

  Give students practice in writing and calling their function

To give students practice in writing and calling their own functions. To give students practice in implementing and planning complex programs.

  Program which asks the user for due date of next assignment

Write a program which asks the user for due date of the next assignment (hours, minutes). Then print number of minutes between the current time and the due date in format.

  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

  Programmingto compute the volume of water in the cubic feet

Write down an algorithm (Programming in C) in order to compute the volume of water in the cubic feet, flowing through a pipe of diameter d in feet, having a velocity of v feet per second.

  C++ programming uml diagrams

The goal of this lab is to better familiarize you with polymorphism and the factory design pattern, two key components in Assignment

  Design a simple game of blackjack

Prepare a simple game of blackjack using object oriented programming.

  Write program in c to calculate diameter-compression load

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

  Write program to perform add-drop-list and update functions

Write C++ program to do add, drop, list (in last name / first name sorted order or id) and update functions. separate UI from data processing use object programming method multiple files

  Write and test c program which outputs waveform

Write and test a C program which outputs waveform which switches from 10.0 kHz with a 50% duty cycle to 25.0 kHz with a 5% duty cycle every 5 seconds.

  Iterative programming problem solving approaches

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

  Create class has three pieces of information as data members

Create a class called Date in C++ that includes three pieces of information as data members: month (type int), day (type int) and yaer (type int).

  Why does the neverwet spray protect it from water

As is know, acetone is a polar molecule like water, so isn't it suppose to mix? So my question is: why does the Neverwet spray protect it from water but not from oils and detergents?

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