Question: ******PLEASE USE A FOR LOOP IN C LANGUAGE****** Activity 2 Write a program that continuously reads an integer number and stores it into an array

******PLEASE USE A FOR LOOP IN C LANGUAGE************PLEASE USE A FOR LOOP IN C LANGUAGE****** Activity 2 Write a

Activity 2 Write a program that continuously reads an integer number and stores it into an array with size of N. The whole code should be a function of N, and make N equals to five (N-5). The index resets to O after writing the Nth data (N-1 index). Determine the average value of the numbers in the array. Display the elements of the array and the average. Initialize all elements of the array with O int num[5] 00 0 0 0 Enter a value: 10 1) num 1000 0 0 ave - (float) 10/ Enter a value: 11 2) num 10 11 0 0 0 ave- (float) 21/ Enter a value: 12 ave- (float) 33/ 3) num 10 11 12 0 0 Enter a value: 13 4) 10 1112 13 0 ave (float) 46/ num Enter a value: 14 5) 10 1112 13 14 ave (float) 60/ num At index N-1, the next index is 0 Enter a value: 15 6) 15 1112 13 14 ave- (float) 65/ num Enter a value: 14 7) num 15 14 12 13 14 ave- (float) 68/

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