Hi, my program needs to return the max value of an array given the input of the user. I believe I am pretty close to getting it to work, but I know I have a few errors. Calling functions still confuses me and I think that is where I am going wrong.
Here is my code:
Any help or suggestions would be greatly appreciated!!
int findLargest(double *array, int arrayLength);
for (pos=0; pos<10 && nums[pos]!=EOF; ++pos)
printf("Enter in a number or EOF to quit: ");
for (pos=0; pos<10; ++pos)
double maximum = findLargest(nums, pos);
printf("There is no maximum element,\n");
printf("The maximum value is %lf at offset %d\n", maximum, OS);
int findLargest(double *array, int arrayLength)
if (arrayLength <= 0)
double max = array;
for (i=0; i<arrayLength; ++i)
if (max < array[i])