I want to allow user to insert number in double array 2-D during the excution of program(output) by using c++ language without using pointer it can be???
example output::
enter number or rows: 3
enter number of columns: 4
enter elements of row 1:
1. 8
2. 3
3. 6 /// these values of elements && number of rows,coulmns inset by user in output
//simplistically you could set up and declare the array:
int rows=0,cols=0;
int value=0;
std::cout<<"\nenter number of rows ";
std::cin>>rows;
std::cout<<"\nenter nunber of columns ";
std::cin>>cols;
int array_b[rows][cols];
//then have the user fill it with values
std::cout<<"\nfill array_b with values\n";
int i,j;
for(i=0;i<rows;i++)
{for(j=0;j<cols;j++)
{
std::cout<<"\nenter a value ";
std::cin>>value;
array_b[i][j]=value;
}
}
//and then print it out
for(i=0;i<rows;i++)
{for(j=0;j<cols;j++)
std::cout<<array_b[i][j]<<' ';
}