Write a C program to multiplication of two matrix.
#include<stdio.h> #include<conio.h> main() { int a[10][10],b[10][10],c[10][10],m,n,p,q,i,j,k; printf("\n Enter the dimension of 1st matrix"); scanf("%d %d",&m,&n); printf("\n Enter the dimension of 2nd matrix"); scanf("%d %d",&p,&q); if(n==p) { printf("\n the multiplication is possiable."); printf("\n Enter the element of 1st matrix"); for(i=0;i<m;i++) { for(j=0;j<n;j++) scanf("%d",&a[i][j]); } printf("\n Enter the element of 2nd matrix"); for(i=0;i<p;i++) { for(j=0;j<q;j++) scanf("%d",&b[i][j]); } for(i=0;i<m;i++) { for(j=0;j<q;j++) { c[i][j]=0; for(k=0;k<n;k++) c[i][j]=c[i][j]+(a[i][k]*b[k][j]); } } printf("\n The 1st input matrix is\n"); for(i=0;i<m;i++) { for(j=0;j<n;j++) { printf("\t%d",a[i][j]); } printf("\n"); } printf("\n The 2nd input matrix is\n"); for(i=0;i<p;i++) { for(j=0;j<q;j++) { printf("\t%d",b[i][j]); } printf("\n"); } printf("\n After multiplication the result matrix is\n"); for(i=0;i<m;i++) { for(j=0;j<q;j++) { printf("\t%d",c[i][j]); } printf("\n"); } } else printf("\n The multiplication is not possable"); getch(); }
Output:
Write the recursive algorithm to find x^ n.
What is WAP? Why it is used?
Why Required of ISO 9001:2000 standard?
What is Weak entity set? Explain with suitable example.
Write short notes on the following:
Short Notes : UML