Ok, I spent some time working on these, but I can't seem to think like a programmer yet. Could someone plz reply on how I would solve these problems?

Here are the problems.

1. Given an int num[max]
(we allready know the average)

Find and show the number closest to the average.

ex. 10, 6, 9, 10, 12 It would show 6 and 9, sence the average is 7.

2. Write the code that will find the average, then show the average and all of the numbers above the average.

ex. 10, 6, 9, 10, 12 It would show 7, 9, 10, 10, 12 but not the 6 because it is less than the average.

Plz help, this is for my computer science class, and it's due tomarow, and I can't seem to figure these 2 out.