Write and test a function that will determine whether the values in an array are in ascending order (adjacent values are increasing or equal in value) or descending order (adjacent values are decreasing or equal in value). The function value should be 1 if the array values are in ascending order, -1 if they are in descending order and 0 if they are in neither order. Assume that the function prototype is
int order(int x[ ], int npts)
i need to let the user enter the values in the array. Andalsol let the user enter the amount of values.
so far i got the outline, but not sure how i can make the user enter the values inside the array.
// A function that will determine whether the
// values in an array are in ascending order,
// descending order or neither.
//