Need help on arrays/functions

Write a program which will do the following. Make sure you use functions in your program. Do not use any global variables.

1.Read numbers from the keyboard into an array. Make your array large enough to allow the user to enter 30 numbers. (call this function Fill)
2.Compute the average of the numbers entered. (call this function Average)
3.Print out those numbers in the array which are greater than the average. (call this function AboveAvg)
4.Write a function which will print out the numbers in the array. The function should have a parameter which indicates the order in which to print the values. If this parameter contains the value 1, print the array from beginning to end. If this parameter contains the value -1, print the array from end to beginning. The function should print one number on each line. Use this function to print the array forwards and backwards. Print a message before calling the function to describe what is being printed. (call this function PrintwOrder)
5.Write a function which will return the number of entries in the array which contain zero. Use this function to print the number of zeros in the array. (call this function ZeroCount)
6.Write a function which will return true if all the numbers in the array are positive (greater than zero) and will return false if any number in the array is not positive (less than or equal to zero). Use the function to print a message indicating whether all the values in the array are positive. (call this function Parity)

We are not here to do your homework. Come with problem and we'll help you.
Topic archived. No new replies allowed.