Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions