Write a C-prog. for Addition of two 4x4 Matrix
for(j=0;j<=3;j++)
scanf("%d",&a[i][j]);
printf("\n");
}
printf("2nd Matrix");
for(i=0;i<=3;i++)
{
for(j=0;j<=3;j++)
scanf("%d",&b[i][j]);
printf("\n");
}
printf("Print 1st Matrix = \n");
for(i=0;i<=3;i++)
{
for(j=0;j<=3;j++)
printf("%d ",a[i][j]);
printf("\n");
}
printf("Print 2nd Matrix = \n");
for(i=0;i<=3;i++)
{
for(j=0;j<=3;j++)
printf("%d ",b[i][j]);
printf("\n");
}
printf("\n addition of 1st and 2nd matrix = \n");
for(i=0;i<=3;i++)
{
for(j=0;j<=3;j++)
printf("%d ",a[i][j]+b[i][j]);
printf("\n");
}
getch();
}
Subscribe to:
Post Comments (Atom)
Related Post
Array:
String functions:
General (Loops-for/while)
No comments:
Post a Comment