//initialize the matrix
int** Matrix; //A pointer to pointers to an int.
cout<<"Enter number of rows: ";
cout<<"Enter number of columns: ";
Matrix=new int*[rows]; //Matrix is now a pointer to an array of 'rows' pointers.
//define the matrix
Matrix[i]=new int[columns]; //the ith array is initialized
for(int j= 0;j<columns;j++) //the i,jth element is defined
cout<<"Enter element in row "<<(i+1)<<" and column "<<(j+1)<<": ";
//Print the matrix
cout<<"The matrix you have input is:\n";
cout<<Matrix[i][j]<<"\t"; //tab between each element
cout<<"\n"; //new row
//now, we have to free up the memory we took by releasing each vector:
Tell me if I am understanding this correctly. This example shows how to add in a "random" number a certain percentage of the time. I was looking at using rand()%2 however my issue is where I can put it. I believe this will create a Matrix looking effect like from the movie.