Question: ( Single - dimension Array ) Write a program With C l that will create an array of integers with 1 0 0 0 entries.

(Single-dimension Array) Write a program With C l that will create an array of integers with 1000 entries. After creating the array, initialize the entire array to 0. Next, using the rand() function, loop through the array and save a random number between 1 and 10(inclusive) in each entry of the array. Once you have completed this, print out the following and then end the program:
a. The sum of all of the numbers stored in the array
b. The average of all the numbers stored in the array
c. The number of times each number (1-10) occurred (there are several ways to do this step; and you can create a second array for this part if it helps)
( Single - dimension Array ) Write a program With

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 Programming Questions!