Question: Qn5. Write a complete C program Declare an array of integers with size 10, read in random numbers between 0 and 99 (use rand function)

 Qn5. Write a complete C program Declare an array of integers

Qn5. Write a complete C program Declare an array of integers with size 10, read in random numbers between 0 and 99 (use rand function) into this array. Then call a function to calculate the average value of the array elements, this function should return a float value; the average value should be printed in main. After that call another function to calculate sum of all odd numbers, this function should return an integer value; result is printed ir main. Then call another function to count the total count of even numbers, this function should return an integer value; result is printed in main. Sample output: rray elenents are 4 verage value of array elenents is 58.50 um of odd numbers in array is 279 Total number of even nunbers in the array is 5

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!