Question: Write a C program that generates 100 random integer numbers in the range from 1 to 100 by calling rand function, and displays 10 numbers

 Write a C program that generates 100 random integer numbers in

Write a C program that generates 100 random integer numbers in the range from 1 to 100 by calling rand function, and displays 10 numbers in a row. The program then checks how many numbers are even numbers and how many are odd numbers. A function with the following function prototype is required to do the counting, and output the results on the screen, void counting even_numbers(int a[], int n); //where n represents the size of the array a. An example run of the program is as follows. The initial set of 100 numbers is: 55 89 5 7 56 53 87 62 36 15 6 67 88 49 83 89 67 52 912 60 48 7 47 7611 18 85 66 37 57 6 77 96 23 36 65 82 9063 63 92 41 87 95 42 28 53 41 98 70 37 70 75 81 73 60 44 61 3 33 4 37 36 49 24 10 44 80 34 8 4 29 4 77 3 24 48 22 7 27 10 35 89 78 30 24 69 27 27 There are 49 even numbers in the range from 1 to 100. There are 51 odd numbers in the range from 1 to 100

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!