Write an c progra, that takes an array of N integers (N will be specified by the user at run time). It then finds how many numbers in the array are divisible by 3 and how many numbers are divisible by 7. the it copies, from the input array above, the numbers that are divisible by 3 into a new array and those divisible by 7 into a different new array. Once copied, the algorithm should compute the average of each of these two new arrays and print the averages on the screen with suitable message to let the user know which average is being printed Note: an integer number is divisible by 3 (respectively 7) if the remaining of its division by 3 (respectively 7) is 0. You are allowed to use the modulus operator %.
Write an c progra, that takes an array of N integers (N will be specified by the user at run time). It then finds how many numbers in the array are divisible by 3 and how many numbers are divisible by 7.
the it copies, from the input array above, the numbers that are divisible by 3 into a new array and those divisible by 7 into a different new array. Once copied, the
Note: an integer number is divisible by 3 (respectively 7) if the remaining of its division by 3 (respectively 7) is 0. You are allowed to use the modulus operator %.
Step by step
Solved in 4 steps with 1 images