}
int a[4] = {5,9,2,10};
Display(a, 4);
void Display(int x[], int n)
{
for (int i = 0; i < n; ++i)
cout << x[i] << '\t';
}
int b[3][3] = { 1, 2, 3, 4, 5, 6,7,8,9 };
int total = Computetotal(b, 3)
int Computetotal(int x[][2], int n)
{
int t = o;
for (int i = 0; i < n; ++i)
{
for (int j = 0; j < 2; ++j)
{
t += x[i][j];
}
}
return t;
}
int c[2][3][2] = { 1, 2, 3, 4, 5,6,7,8,9,10,11,12}
int total = Computetotal(c, 2)
int Computetotal(int x[][2][4], int n)
{
int t = 0;
for (i = 0; i < n; ++i)
{
for (int j = 0; j < 2; ++j)
{
for (int k = 0; k < 4; ++k)
{
t += c[i][j][k];
}
}
}
return t;
}
}