void indexOf(int arr[], int lenght){
int temp=0;
int e;
for (int i = 0; i < lenght; i++)
{
if (arr[i]>temp){
temp = arr[i];
e = i;
}
}
cout << "the index is : " << e << " and the value is : " << temp << endl;
}
// arr[] is your array and length is the length of the array