This function should accept a two-dimensional

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

Write a program that creates a two-dimensional array initialized with test data. Use any data type you wish. The program should have the following functions:

getTotal. This function should accept a two-dimensional array as its argument and return the total of all the values in the array.

- getAverage. This function should accept a two-dimensional array as its argument and return the average of all the values in the array.

- getRowTotal. This function should accept a two-dimensional array as its argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The function should return the total of the values in the specified row.

- getColumTotal. This function should accept a two-dimensional array as its argument and an integer as its second argument. The second argument should be the subscript of a column in the array. The function should return the total of the values in the specified column.

- getHighestInRow. This function should accept a two-dimensional array as its argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The function should return the highest value in the specified row of array.

- getLowestInRow. This function should accept a two-dimensional array as its argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The function should return the lowest value in the specified row of array.

Reference no: EM13165511

Questions Cloud

Arrays & more loops practice : Write a program ArraysAndLoops and implement the following in the main method:
State what kind of compound is dihydroxypentane : What kind of compound is 2,3-dihydroxypentane? From what precursor do you synthesize the kind of compound that 2,3-dihydroxypentane is?
The main program should create an ifstream : For decryption, the main program should create an ifstream for the file to be decrypted. It should use the getline method of the ifstream to read lines from the file, call the encryption / decryption function with the line to be decrypted, and dis..
People must be in a group in order to guarantee : How many people must be in a group in order to guarantee that two people in the group have the same birthday (don't forget leap year)?
This function should accept a two-dimensional : getLowestInRow. This function should accept a two-dimensional array as its argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The function should return the lowest value in the specif..
Considered to be an improved version : Part (c) is considered to be an improved version of Part (b). You may use an array (2-dimessional) to store some values that has been computed during the run so that when making recursive calls the program does not compute certain values over and ..
What mass of this substance must evaporate : What mass of this substance must evaporate in order to freeze 112 of water initially at 18? (The heat of fusion of water is 334 the specific heat of water is 4.18 .
Flaw in your design and outline : After completing Part a, discuss the flaw in your design and outline some code that will cause it to break (your code should compile fine and will also execute without an error but will violate how a rectangle or square should behave).
Calculate the mole percent composition of the mixture : Calculate the weight percent composition of the mixture, using the same assumptions as in part A.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write test program to call function several times for gcd

Greatest common divisor of two integers is largest integer which will evenly divide both integers. Implement this function in assembly language and write test program which calls function several times, passing it different values.

  The factorial of a positive integer n, denoted by n!

Write a program that computes the sequence of factorial values: 1! = 1, 2! = 2, 3! = 6, 4! = 24, 5! = 120, 6! = 720, ....

  Program to check compatibity for matrix multiplication

Write down program in C++ for matrix multiplication. Program must accept dimension of both matrices to be multiplied and check for compatibity.

  Design in c a unix utility program gasp

Design in C a Unix utility program gasp. Command gasp [options] STRING FILE... must read listed files (FILE...) and copy each line from input to stdout if it contains STRING.

  Prevent illegal moves without crashing

Your program must gracefully handle the case when a player tries to add a non-number to a square, or add a number that violates the Sudoku rules. It should prevent illegal moves without crashing.

  Write function to find whether number is perfect number

Write down the function perfect which determines whether number is perfect number or not. This function must receive number and return true if number is perfect.

  Write a program that plays a tic-tac-toe game.

Using functional decomposition, write a program that plays a tic-tac-toe game.

  Floating point values into an array

Write a program that allows a user to enter 10 floating point values into an array. Then, in a loop, the program should prompt the user for a desired precision and subsequently display each value to the correct precision.

  Once the user enters a 0

Once the user enters a 0 you will exit the loop, close the file and execute the code as previously designed until you have displayed all of the scores and the average handicap.

  Write a c program that reads in five numbers

Q1. (Bar Chart /Histogram printing) Write a C program that reads in five numbers (each between 1 and 30). For each number read, your program should print a line containing that number of adjacent asterisks. For example, if your program reads the numb..

  Design class for textbook-data field for grade level of book

Design a class named TextBook that is child class of Book. Include new data field for grade level of book. Create a displayTextBookInfo () method so that you can accommodate new grade-level field.

  Develop a basic temperature class

You have to develop a basic temperature class

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