Computer science homework 9
CS111 Assignment 9
Note: Assignments submitted by 5/8/2016 will get full score if the program works as expeced.
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;
}
10 years ago
5
Purchase the answer to view it

- screenshot_cplus.jpg
- cplusassignment.zip
- Data distribution
- MKT 421 Week 3 Individual Assignment Marketing Research Paper
- Essay edit
- Cost
- In order to successfully complete this assignment, the student must: 1. Select one article from the list below and read carefully...
- Jose has scored 562 points on his math tests so far this semester. To get an A for the semester,...
- Ethics
- Compare differing conceptualizations of the mind and how the mind is studied.Address the influence of internal and environmental conditions on...
- ACC 561 Week 2 assignment help
- Find five new/ or less known careers that are dependent on an education in biology. These are careers and or job titles...
