i have this quastion to do but there are some mistakes i've done in the program
so please if you can help just do it
this is the quastion:
"
Write a C++ function that takes as parameters an int two dimensions array and its size (int rows, int clo). The function should return the maximum element in the array.
Function prototype should be int maxElement( int arr[][], int rows, int clo)
#include <iostream>
usingnamespace std;
int maxElement( int arr[][], int rows, int clo)
{ int i;
int j;
for(i=0;i<5;i++)
{int rows;
int max;
cin>>arr[i][j];
max*=1;
return max;
}
for(j=0;j<5;j++)
{int clo;
int max;
cin>>arr[i][j];
max*=1;
return max;
}
}
int main()
{int arr[][];
int max;
int maxElement( int arr[][], int rows, int clo)
system("pause");
}