Write a program in which the main function reads an integer array data_items of size 10 and an integer variable num. It then passes the array data_items and the num variable to a function called...


Write a program in which the main function reads an integer array data_items of size 10 and an integer variable num. It then passes the array data_items and the num variable to a function called count_divisors which counts the number of elements of array data_items that are divisible by num and returns the count to the main program which prints it.



Sample Output:


Enter 10 integer for the array: 12 14 16 32 8 33 1 21  44 64


Enter a number to test as a divisor of array elements:8


There are 4 elements divisible by 8



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here