JSSCE- Junior Secondary School Certificate Examination
Chat with our AI personalities
e,j,h,t,c
C
J. C. Sherritt was born on 1988-05-02.
/* multiplication of a 3*3 matrix*/ #include<stdio.h> main() { int a[3][3],b[3][3],c[3][3]; int i,j,k; printf("enter the elements in A matrix:\n"); for(i=0;i<=2;i++) { for(j=0;j<=2;j++) { scanf("%d",&a[i][j]); } } printf("enter b matrix:\n"); for(i=0;i<=2;i++) { for(j=0;j<=2;j++) { scanf("%d",&b[i][j]); } } for(i=0;i<=2;i++) { printf("\n"); for(j=0;j<=2;j++) { c[i][j]=0; for(k=0;k<=2;k++) { c[i][j] = c[i][j]+a[i][k] * b[k][j]; } } } printf("multiplication matrix is:\n"); for(i=0;i<=2;i++) { for(j=0;j<=2;j++) { printf("%d\t",c[i][j]); } printf("\n"); } }
Matrix-Addition(a,b)1 for i =1 to rows [a]2 for j =1 to columns[a]3 Input a[i,j];4 Input b[i,j];5 C[i, j] = A[i, j] + B[i, j];6 Display C[i,j];