Jan 29, 2013

Addition of two 3*4 matrix

/*Addition of two 3*4 matrix*/

#include<stdio.h>
#include<conio.h>
void main()
{
int A[3][4]={5,7,8,9,4,3,2,1,6,7,9,4};
int B[3][4]={8,3,2,1,5,7,6,4,3,9,8,5};
int C[3][4];
clrscr();
for(int i=0;i<3;i++)
{
for(int j;j<4;j++)
{
C[i][j] A[i][j]+B[i][j];
printf("Additional of two matrix"\n);
printf("%-4d",C[i][j]);
}
}
getch();
}


Output=Additional of two matrix
13 10 10 10 9 10  8 5 9 16 17 9

No comments:

Post a Comment

Thank you for visit this site. You will get many programming news from here and learn programming very easily.

Popular Posts