my code is not running properly . there is no error still output is not perfect
Wave print and array formation
Modified Code
for(int row=0;row<m;row++){
for(int col=0;col<n;col++){
a[row][col]= val;
val=val+1;
cout<<a[row][col]<<" ";
}
cout<<endl;
}
although it is not correct way to fill the array but if you want…
only change you have to do is instead of row<n-1 use row<n similarly for col