rewrite the program of Exercise 4.14 to make the row parameter of the matrix as a default argument.

//rewrite the program of Exercise 4.14 to make the row parameter
//of the matrix as a default argument.

//DEFAULT VALUE\\
#define row 50
#define col 50
#include
#include
#include
void main()
{
void data_entry_matrix(int cols,int rows=3);
clrscr();
cout<<"\n\n\tusing rows as default value";


cout<<"\n\n\tEnter Number of Column You want to enter:-";
int cols;
cin>>cols;

data_entry_matrix(cols);

getch();
}



void data_entry_matrix(int c, int r)
{
clrscr();
int matrix[row][col];
cout<<"\n\n\t\tEnter Your Data for Matrix " << r <<"x" << c <<"\n\n\n\t";
//for input
for(int i=0;i < r;i++)
{
for(int j=0;j < c;j++)
{
cin>>matrix[i][j];
}
}

cout<< endl << endl << endl;
//for display
cout<<"\n";
for(int i=0;i < r;i++)
{
for(int j=0;j < c;j++)
{
cout << setw(5)<< matrix[i][j];
}
cout << endl;
}

}