Write a function named getrandomaverage that uses a for


Write a function named "getRandomAverage" that uses a "for" loop to compute the average of random numbers. The function receives the quantity of numbers to be averaged and returns the average of all thevalues. It does not print any output from within the function. Use a "for" loop to find the sum of all therandom values. Note that the average is the sum divided by the quantity of values. The following is anexample of what your command window might look like:

>> getRandomAverage (5)

ans = 0.6307

>> getRandomAverage (500)

ans = 0.4872

>> getRandomAverage (5000)

ans = 0.5041

 

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write a function named getrandomaverage that uses a for
Reference No:- TGS01115356

Expected delivery within 24 Hours