2 Dim-Array ... can u help!

Hey guys "Again"

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)

"

and this is my work:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 #include <iostream>
using namespace 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");
 } 

closed account (2UD8vCM9)
Don't make multiple posts for the same topic....
Topic archived. No new replies allowed.