I need help with this:

Write a function that takes two parameters, an integer array and its size. The function should compute and return the number of odd integers in the array, the number of even integers in the array, and the average of all the integers in the array.

If someone could walk me through the solution I'd be very grateful, I understand nothing -cries-

Write a function that takes two parameters, an integer array and its size. The function should compute and return the number of odd integers in the array, the number of even integers in the array, and the average of all the integers in the array.

If someone could walk me through the solution I'd be very grateful, I understand nothing -cries-

Last edited on

You should try something by yourself. And if you have some problems with code, somebody will help you.

That is the issue, I've tried tutorials, etc.

I just can't wrap my head around return functions or implementing arrays into user-defined functions.

I'm not asking for a simple copy paste solution, I want an explanation to how to solve this question.

I just can't wrap my head around return functions or implementing arrays into user-defined functions.

I'm not asking for a simple copy paste solution, I want an explanation to how to solve this question.

About your question. As I know function could return only one value. You should write few functions to return all that stuff.

The question stressed the fact that it requires 1 function, another reason why I am lost.

Topic archived. No new replies allowed.