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
i need to do my home work
Rahul is a newbie to the programming and while learning the programming language he came to know the following rules: · Each program must start with ''{'' and end with '
Why shouldn't Matrix class's interface look like an array-of-array? A: Some people build a Matrix class that has an operator[] that returns a reference to an Array object (or po
Is it legal for a member function to say delete this? A: As long as you're cautious, it's OK for an object to delete this. Here's how I define "cautious": You have to be a
.Create a Csharp solution that will show a maze in the user interface and will show a mouse walking through the maze attempting to locate the exit door (the cheese).
Constructors and Destructors: A Class is defined as constructor by declaring a constructor in the form of function inside the class. In other word a function in the name of
Create a C language code, only one program, to implement the following task. Task: Write C code for a program that implements a digital clock (HH:MM:SS). The clock inclu
program and solution for the above question
Program is to perform string operations: Program is to perform string operation without using in built functions using classes and object void mainmenu() { clrs
Aim: To implement a program to maintain information of employees in an educational institute using inheritance. Code: class staff {
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