Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix multiplication in C++ #554

Open
wants to merge 552 commits into
base: Array
Choose a base branch
from
Open

Matrix multiplication in C++ #554

wants to merge 552 commits into from

Conversation

nikhilsharma2020
Copy link

#include
using namespace std;
int main()
{
int a[10][10],b[10][10],mul[10][10],r,c,i,j,k;
cout<<"enter the number of row=";
cin>>r;
cout<<"enter the number of column=";
cin>>c;
cout<<"enter the first matrix element=\n";
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
{
cin>>a[i][j];
}
}
cout<<"enter the second matrix element=\n";
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
{
cin>>b[i][j];
}
}
cout<<"multiply of the matrix=\n";
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
{
mul[i][j]=0;
for(k=0;k<c;k++)
{
mul[i][j]+=a[i][k]*b[k][j];
}
}
}
//for printing result
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
{
cout<<mul[i][j]<<" ";
}
cout<<"\n";
}
return 0;
}

herobank110 and others added 30 commits October 1, 2020 19:34
Write C++/Java program to draw line using DDA and Bresenham‘s algorithm. Inherit pixel
class and Use function overloading.
Write C++/Java program to draw circle using Bresenham‘s algorithm. Inherit pixel class.
A program to search for a given number in a 2D Array 
A matrix is said to be sorted where each row and column is sorted.
Time Complexity- O(n+m) | Space Complexity O(1)
Add Preorder tree traversal
Add vector representation of genreal sparse Matrix.
Hope you like it :-)
Minimum number of swaps required to sort the array
Remainder without using modulo
Added Taylor Series by Horner's Rule
AbubabaBackend and others added 30 commits October 22, 2021 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.