I have an assignment where I have to pass the array to a function then use that function to find and output the largest number. I feel like I am close but I have been stumped on this for hours now and can't get a response out of my teacher. Any help would be GREATLY appreciated.
#include <iostream>
usingnamespace std;
int main(){
int thearray[3]={54,25,63};
findarrmax(int thearray,3);
}
void findarrmax(int thearray[], int i)
int max = thearray[0];
for (int i=1;i<array;i++)
{
if(max<array[i])
max=array[i];
}
return max;