double maxim(double* arr, int size) {
double* ptr = arr;
double max = *ptr;
for (int i = 1; i < size; i++) {
if (*(ptr + i) > max) {
max = *(ptr + i);
}
}
return max;
}
it seems like it only takes in the first value of the array instead of its entirety, im not sure if its because of the way i wrote the function or rather the way i wrote my list into it later in the main.