Question: Program: Write a program with several functions that performs the following tasks. : Create a function that reads the following 10 integer numbers from the

Program:

Write a program with several functions that performs the following tasks. :

Create a function that reads the following 10 integer numbers from the file data.txt into array A.

10 15 27 89 90 95 27 13 99 33

Copy array A into array B in reverse order

Print array A.

Print array B.

Find the number of elements in array A that are >= 80 and <=100.

Find the number of the elements in array A in which their contents are divisible by 5

Find the index of the elements in array A in which their contents are divisible by 5.

Find mean (average) in array A.

Find the minimum number in array A.

Ask the user to input a key. Then search for the key in array A and inform the user about the existence (true / false) of the key in array

Your program should include several functions.

A function for filling up the information into an array (part a calls this function)

A function that does the copying of one array into another in reverse order. Arrays must have the same size. (part b calls this function)

Printing any array with any size ( part c and d should call this function)

finding and returning the number of elements between 80 and 100 in any array with any size (part e calls this function)

finding and returning the number of elements in an array that are divisible by 5 (part f calls this function)

printing the index of elements in an array that are divisible by 5 (part g calls this function)

finding and returning the mean (average) of elements in any array with any size (part h calls this function)

finding and returning the minimum number in any array of any size (part i calls this function)

searching for a key in any array of any size and returning true/false as result (part j calls this function)

Note: If your function is supposed to return a value, then do not print anything inside the function. It would be the job of the main program to print the result on the screen. However, if the function is supposed to print information (like the print function), then you can use cout statement inside the function to print the related information.

Also, any parameter that is not supposed to be changed inside a function must be declared as constant parameter.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!