MTrajK / coding-problems

Solutions for various coding/algorithmic problems and many useful resources for learning algorithms and data structures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

General coding problem

SurajitI opened this issue · comments

#include <stdio.h>

int main()
{
int m1[5][5],m2[5][5],m3[5][5];
printf("Give all element of first matrix\n");
for(int i=0;i<4;i++){
for(int j=0;j<4;j++)
{ printf("give %d Th row %d Th column element\n",i,j);
scanf("%d",&m1[i][j]);
}
}
printf("Give all element of second matrix\n");
for(int i=0;i<4;i++){
for(int j=0;j<4;j++)
{ printf("give %d Th row %d Th column element\n",i,j);
scanf("%d",&m2[i][j]);
}
}printf("Summation of two matrix :\n");
for(int i=0;i<4;i++){
for(int j=0;j<4;j++)
{ //printf("give %d Th row %d Th column element\n",i,j);
//scanf("%d",&m2[i][j]);
m3[i][j]=m1[i][j]+m2[i][j];

}

}//printf("Give all element of second matrix\n");
for(int i=0;i<4;i++){
for(int j=0;j<4;j++)
{ printf("%d",m3[i][j]);
// scanf("%d",&m2[i][j]);
}printf("\n");
}
return 0;
}

There is no description, as I can see there several different problems. Plus it's C (not Python). I'll close the issue (please read the README.md if you want to contribute)