Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
WAP in C for multiplication of matrices with compatibility Check
#include
void main()
{
long int m1[10][10],m2[10][10],i,j,mult[10][10],r1,c1,r2,c2;
printf("enter order of matrix 1:\n\n");
scanf("%d %d",&r1,&c1);
printf("enter order of matrix 2:\n\n");
scanf("%d %d",&r2,&c2);
if(c1==r2)
printf("Enter element of matrix 1:\n\n");
for(i=0;i for(j=0;j { scanf("%d", &m1[i][j]); } printf("\nEnter elements of Martix 2:\n\n"); for (i=0;i for(j=0;j { scanf("%d",&m2[i][j]); } printf("\n Matrix 1:\n\n\n"); for(i=0;i { for(j=0;j printf("\t%d",m1[i][j]); printf("\n"); } printf("\n matrix 2:\n\n"); for(i=0;i { for(j=0;j printf("\t%d",m2[i][j]); printf("\n"); } printf("\n Multiplicfation Of Matrices\n\n"); // for matrix multiplication for(i=0;i { for(j=0;j { mult[i][j]=0; for(long int k=0;k<=r1;k++) { mult[i][j]+=m1[i][k]*m2[k][j]; } printf("\t%d",mult[i][j]); } printf("\n"); } } else printf("\n Multiplication is not possible with the order of matrices\n\n"); } OUTPUT
for(j=0;j { scanf("%d", &m1[i][j]); } printf("\nEnter elements of Martix 2:\n\n"); for (i=0;i for(j=0;j { scanf("%d",&m2[i][j]); } printf("\n Matrix 1:\n\n\n"); for(i=0;i { for(j=0;j printf("\t%d",m1[i][j]); printf("\n"); } printf("\n matrix 2:\n\n"); for(i=0;i { for(j=0;j printf("\t%d",m2[i][j]); printf("\n"); } printf("\n Multiplicfation Of Matrices\n\n"); // for matrix multiplication for(i=0;i { for(j=0;j { mult[i][j]=0; for(long int k=0;k<=r1;k++) { mult[i][j]+=m1[i][k]*m2[k][j]; } printf("\t%d",mult[i][j]); } printf("\n"); } } else printf("\n Multiplication is not possible with the order of matrices\n\n"); } OUTPUT
scanf("%d", &m1[i][j]);
}
printf("\nEnter elements of Martix 2:\n\n");
for (i=0;i for(j=0;j { scanf("%d",&m2[i][j]); } printf("\n Matrix 1:\n\n\n"); for(i=0;i { for(j=0;j printf("\t%d",m1[i][j]); printf("\n"); } printf("\n matrix 2:\n\n"); for(i=0;i { for(j=0;j printf("\t%d",m2[i][j]); printf("\n"); } printf("\n Multiplicfation Of Matrices\n\n"); // for matrix multiplication for(i=0;i { for(j=0;j { mult[i][j]=0; for(long int k=0;k<=r1;k++) { mult[i][j]+=m1[i][k]*m2[k][j]; } printf("\t%d",mult[i][j]); } printf("\n"); } } else printf("\n Multiplication is not possible with the order of matrices\n\n"); } OUTPUT
for(j=0;j { scanf("%d",&m2[i][j]); } printf("\n Matrix 1:\n\n\n"); for(i=0;i { for(j=0;j printf("\t%d",m1[i][j]); printf("\n"); } printf("\n matrix 2:\n\n"); for(i=0;i { for(j=0;j printf("\t%d",m2[i][j]); printf("\n"); } printf("\n Multiplicfation Of Matrices\n\n"); // for matrix multiplication for(i=0;i { for(j=0;j { mult[i][j]=0; for(long int k=0;k<=r1;k++) { mult[i][j]+=m1[i][k]*m2[k][j]; } printf("\t%d",mult[i][j]); } printf("\n"); } } else printf("\n Multiplication is not possible with the order of matrices\n\n"); } OUTPUT
scanf("%d",&m2[i][j]);
printf("\n Matrix 1:\n\n\n");
for(i=0;i { for(j=0;j printf("\t%d",m1[i][j]); printf("\n"); } printf("\n matrix 2:\n\n"); for(i=0;i { for(j=0;j printf("\t%d",m2[i][j]); printf("\n"); } printf("\n Multiplicfation Of Matrices\n\n"); // for matrix multiplication for(i=0;i { for(j=0;j { mult[i][j]=0; for(long int k=0;k<=r1;k++) { mult[i][j]+=m1[i][k]*m2[k][j]; } printf("\t%d",mult[i][j]); } printf("\n"); } } else printf("\n Multiplication is not possible with the order of matrices\n\n"); } OUTPUT
for(j=0;j printf("\t%d",m1[i][j]); printf("\n"); } printf("\n matrix 2:\n\n"); for(i=0;i { for(j=0;j printf("\t%d",m2[i][j]); printf("\n"); } printf("\n Multiplicfation Of Matrices\n\n"); // for matrix multiplication for(i=0;i { for(j=0;j { mult[i][j]=0; for(long int k=0;k<=r1;k++) { mult[i][j]+=m1[i][k]*m2[k][j]; } printf("\t%d",mult[i][j]); } printf("\n"); } } else printf("\n Multiplication is not possible with the order of matrices\n\n"); } OUTPUT
printf("\t%d",m1[i][j]);
printf("\n");
printf("\n matrix 2:\n\n");
for(i=0;i { for(j=0;j printf("\t%d",m2[i][j]); printf("\n"); } printf("\n Multiplicfation Of Matrices\n\n"); // for matrix multiplication for(i=0;i { for(j=0;j { mult[i][j]=0; for(long int k=0;k<=r1;k++) { mult[i][j]+=m1[i][k]*m2[k][j]; } printf("\t%d",mult[i][j]); } printf("\n"); } } else printf("\n Multiplication is not possible with the order of matrices\n\n"); } OUTPUT
for(j=0;j printf("\t%d",m2[i][j]); printf("\n"); } printf("\n Multiplicfation Of Matrices\n\n"); // for matrix multiplication for(i=0;i { for(j=0;j { mult[i][j]=0; for(long int k=0;k<=r1;k++) { mult[i][j]+=m1[i][k]*m2[k][j]; } printf("\t%d",mult[i][j]); } printf("\n"); } } else printf("\n Multiplication is not possible with the order of matrices\n\n"); } OUTPUT
printf("\t%d",m2[i][j]);
printf("\n Multiplicfation Of Matrices\n\n");
// for matrix multiplication
for(i=0;i { for(j=0;j { mult[i][j]=0; for(long int k=0;k<=r1;k++) { mult[i][j]+=m1[i][k]*m2[k][j]; } printf("\t%d",mult[i][j]); } printf("\n"); } } else printf("\n Multiplication is not possible with the order of matrices\n\n"); } OUTPUT
for(j=0;j { mult[i][j]=0; for(long int k=0;k<=r1;k++) { mult[i][j]+=m1[i][k]*m2[k][j]; } printf("\t%d",mult[i][j]); } printf("\n"); } } else printf("\n Multiplication is not possible with the order of matrices\n\n"); } OUTPUT
mult[i][j]=0;
for(long int k=0;k<=r1;k++)
mult[i][j]+=m1[i][k]*m2[k][j];
printf("\t%d",mult[i][j]);
else
printf("\n Multiplication is not possible with the order of matrices\n\n");
OUTPUT
Recently social media has been flooded by fb posts, tweets, news articles about only thing demonetization.A great debate is ongoing over it. Most of the people discussing in social
software crisis definition
my program does not run more than 9 iterations when ever i want to iterate more than 100 iterations. what is the reason and how to tackle?
I have a C++ programming assignment due on 8th January. As I am out of country and cannot complete it, I would like to know how much fees would you charge to complete the assignmen
find area uder the curve y=f(x) between x=a and x=b
(a) Write a procedure that computes the Ackermann-Peter a(m,n) function. (b) Write a helper procedure that only allows the calculation of the Ackermann-Peter function for 0≤m
i wont to make triangle with number but number from the largest possible number to 01 (reversed).
Need FTP Upload and MySQL Project Description: We are in need of an executable application that will be execute as a scheduled task on Windows Server 2008 R2 and can perform
Scope Rules and Storage Classes The storage class verifies the life of a variable in terms of its duration or its scope. There are four storage classes : automatic static
overload assignment opertor to assign the data of one object to anthor
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd