I triying to write a program with array and functions. But it's realy hard to solve it with my restricted knowledge. Help me please. The problem is:
Write a program where a user can insert integers to an array, find an integer (i.e. find
the index of an integer previously entered and if it is inserted before) and find the
average, sum and maximum of the integers inserted at any time.
User can enter 100 integers at most (i.e. you should have an array of 100 integers)
You should write functions as
int find(int arr[], int i, int x);
this function receives the array and the current number of elements(i) and the
number that is being searched (x) as arguments and returns the index of the element
if it is found in the arrayand returns -1 if x is not in the array.
int sum(int arr[],int i);
this function receives the array and the current number of elements(i) as arguments
and returns the sum of the elements in the array
int max(int arr[],int i);
this function receives the array and the current number of elements(i) as arguments
and returns the maximum of the elements in the array