Write a program that sizes an array to hold 5000 values of


In C Language (not C++) Write a program that: Sizes an array to hold 5000 values of type int. Using the rand( ) function, create random numbers from 1-1000 and place into the array.

Computes the following values for the array (use of functions is optional):

i. Sum of the array values

ii. Computes the minimum value in the array

iii. Computes the maximum value in the array

iv. Computes the mean (average) of the values in the array

v. Changes the array based on following logic: 0-500 converted to 1, 500 to 1000 converted to 2 Prints out the array values to the screen Prints out the array values to a file "results.txt"

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a program that sizes an array to hold 5000 values of
Reference No:- TGS01522244

Now Priced at $10 (50% Discount)

Recommended (92%)

Rated (4.4/5)