#include <iostream>
using namespace std;
void pop(int s, int n)
{
for (int l = 0; l < n; l++)
{
for (int i = 0; i < n; i++)
{
cout << s[l][i] << "\t";
}
cout << endl;
}
}
int main()
{
int n, num;
cout << "Enter the Number of matrix -> ";
cin >> n;
int s[n][n];
for (int l = 0; l < n; l++)
{
for (int i = 0; i < n; i++)
{
s[l][i] = l+i;
}
}
pop(s, n);
system("pause");
return 0;
}
need some help with passing multidimensional array to a function.
thanks in advance.