The matrix can be represented by a two-dimensional array
#include
using namespace std;
const x=7,y =5;//7 and 5 here are examples, you can change them yourself, be careful not to make mistakes when assigning values ??to the array
int main()
{
int a[x][y]={{1,2,3,4,5},{6,7,8,9,10},{11,12,13,14,15},{16, 17,18,19,20},{21,22,23,24,25},{26,27,28,29,30},{31,32,33,34,35}};
int i,j,I,M=0;
for(i=0;i { for( j=1,I=a[i][0];j {