array solution recommended!!

September 29, 2010 at 22:03:10
Specs: Windows 7
QUESTION 1 : Largest Element
Write a function to find the largest element in an array of integers using the following
function headers:
double max(double array[ ], int size)
Write a test program that prompt the user to enter eight double values, invokes this
function, and display the maximum value in the array. Here is a sample program
Enter eight number : 29.2 11.24 8 192 282.821 0.22 38 4.01
The largest number is 282.821

QUESTION 2 : Summing Matrix
Write a function that sums all the integers in a matrix of integers using the following
const int SIZE = 4;
double sumMatrix (const double m[ ][SIZE],
int rowSize, int ColumnSize);
Write a test program that reads a 4-by-4 matrix and displays the sum of all its
elements. Here is the sample output:
Enter a 4-by-4 matrix row by row:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Sum of the matrix is 136

QUESTION 3 : Payroll Arrays
Write a program that uses the following arrays:
• empId: an array of seven long integers to hold employee
identification numbers.
• hours: an array of seven integers to hold the number of
hours worked by each employee
5658845 4520125 7895122 8777541
8451277 1302850 7580489
• payRate: an array of seven doubles to hold each
employee’s hourly pay rate
• wages: an array of seven doubles 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. The 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) and store them 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 number less then 6.00 for pay

See More: array solution recommended!!

Report •

September 30, 2010 at 08:26:14
Awesome. When you get past the, "Have the Internet do my homework for free" stage, let us know.

If you start doing your homework yourself, but run into problems, feel free to ask us. Make sure to include the code you're having problems with.

If you prefer to have the Internet do your homework, well, that's an option, too.

Report •
Related Solutions

Ask Question