Write the void function generateint n in a that generates


Exercise: Random Numbers

Write the void function generate(int N, in A[ ]) that generates and prints N numbers each between 12 and 83 inclusive.

Write the function average(int, int [ ]) that returns the average of the elements of an array.

Write the function frequency(int, int [ ], float, int &) that counts how many element in the array is above the average and how many element is below the average.

Write the function main( ) that reads N, calls the function generate( ), calls the function average( ), calls the function frequency( ), and prints the result, see sample input / output.

Sample input/output:

enter number of random number: 11

the 11 random number are: 76 82 55 53 40 69 58 55 57 30 76

the averag of the 11 random number is : 59.1818

there are 7 number below the average and 4 numbers above the average

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write the void function generateint n in a that generates
Reference No:- TGS02894558

Expected delivery within 24 Hours