Question: Implement a C program to find the average of 1 0 0 integers that are randomly generated: The C program MUST follow these steps: 1

Implement a C program to find the average of 100 integers that are randomly generated: The C
program MUST follow these steps: 1) declare an int array of 100 elements, and use a for loop to
generate 100 random integers using rand() function and store them in the array; 2) use another for
loop to accumulate those numbers by reading them from the array and adding up to a variable; 3)
calculate the average by dividing the accumulated sum with 100, and 3) print the average and
return the average. Your program should NOT do the number generation and accumulation in one
loop

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!