Find average will return average of the number of the array

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

Computer science assignment

Write a complete C++ program that will randomly generate 20 integers between the ranges 60 - 100 and store the result in an array. The program should consists of the following functions to test out the array:

a. FindMax will return the largest number of the array.

b. FindMin will return the smallest number of the array.

c. FindAverage will return the average of the number of the array.

d. FindMinGap will return the smallest gap in between the adjacent entries of the array. (A gap between two numbers is the absolute value of their difference)

e. FindGapSum will return the sum of gaps between adjacent entries of an array.

The main program should be similar to below:

int main() {

int array[20] = { };

// initialize all the value of the array;

cout << findMax(array, 20) << endl;

cout << findMin(array, 20) << endl;

cout << findAverage(array, 20) << endl;

cout << findMinGap(array, 20) << endl;

cout << findGapSum(array, 20) << endl;

}

Reference no: EM131066815

Questions Cloud

What is the effective interest rate per payment : You have made an investment that pays you $2,000 at the end of the first year, and then decreases by 9% each year for 4 more years (5years total). What is the FUTURE worth of this investment? (interest rate= 9%).
How high are you off the ground after 5 minutes : How high are you off the ground after 5 minutes?
Mass of sodium phosphate : What mass of sodium phosphate would have to be added to 1.5Lof this solution to completely eliminate the hard water ions? Assume complete reaction.
Determining an empirical formula by combustion analysis : The compound dioxane, which is used as a solvent in various industrial processes, is composed of C, H, and O atoms. Combustion of a 2.203-g sample of this compound produces 4.401 g CO2 and 1.802 g H2O. A separate experiment shows that it has a mol..
Find average will return average of the number of the array : FindAverage will return the average of the number of the array. FindMinGap will return the smallest gap in between the adjacent entries of the array. (A gap between two numbers is the absolute value of their difference).
How many different four- letter secret codes can be formed : You are taking a multiple-choice test that has 9 question. Each of the question has 3 choice with one correct choice per question. If you select one of the option per question and leave nothing blank. In how may ways can you answer the question?
What is the probability of randomly generating your cousin''s : What is the probability of randomly generating your cousin's telephone number?
Information you learned and evaluated in developing : At least two insights you have gained with regard to the impact of parents, families, early childhood care and education, and community on children's development
Find the probability of getting a five each time : You are dealt one card from a 52- card deck. Then the card is replaced in the deck, the deck is shuffled, and you draw again. Find the probability of getting a picture card the first time ad a spade the second time.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

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

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

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

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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