0% found this document useful (0 votes)
1K views1 page

Code2flow - Online Interactive Code To Flowchart Converter

This document contains the code for matrix multiplication in C programming language. It first takes the dimensions of matrix A and B as input, checks if multiplication is possible based on matching dimensions, then takes the elements of both matrices as input and stores them in arrays. It initializes the result matrix C to 0, then loops through matrices A and B to calculate individual elements of C as the sum of products of corresponding elements of A and B.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views1 page

Code2flow - Online Interactive Code To Flowchart Converter

This document contains the code for matrix multiplication in C programming language. It first takes the dimensions of matrix A and B as input, checks if multiplication is possible based on matching dimensions, then takes the elements of both matrices as input and stores them in arrays. It initializes the result matrix C to 0, then loops through matrices A and B to calculate individual elements of C as the sum of products of corresponding elements of A and B.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

void main()

int a[10][10],b[10][10],c[10][10],m,n,i,j,k,p,q

clrscr()

printf(" Enter the no of rows and columns of matrix A \n")

scanf("%d%d",&m,&n)

printf("Enter the no of rows and columns of matrix B \n")

scanf("%d%d",&p,&q)

m==p

 True   False 

printf("Matrix multiplication is possible \n")

printf("Matrix multiplication is not possible")

printf("Enter the elements of matrix A\n")

i=0

i<m

 True   False 

j=0 printf("Enter the elements of matrix B\n")

i=0

j<n

 False   True 

i++ scanf("%d",&a[i][j]) i<m

 False   True 

j++ i=0 j=0

i<m j<n

 True   False   True   False 

j=0 printf(" Matrix multiplication is\n") scanf("%d",&b[i][j]) i++

i=0 j++

j<n

 False   True 

i++ c[i][j]=0 i<m

 True   False 

k=0 j=0 getch()

k<n j<n

 True   False   True   False 

c[i][j]=c[i][j]+a[i][k]b[k] j++ printf("%d\t",c[i][j]) printf("\n")

 j 

k++ j++ i++

We use cookies and local storage to improve user experience I Understand ()

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy