I need help solving the following problem:
"Write a function that gets an array of integers as a parameter and returns the index of the largest element of the array.
I made a part of the code and it does what was requested, but not in the way it was requested:
int recebeArray(){
int mtrx[5];
int count, maior;
for(count=0; count<5; count++){
printf("Digite um numero \n");
scanf("%d",&mtrx[count]);
if(mtrx[count] > mtrx[count-1]){
maior=mtrx[count];
}
}
printf("O maior numero e' : %d",maior);
}
int main(){
recebeArray();
}