Question
This is c++ program of multiplying matrix .. also i computed each number in the output matrix with a separate thread . cab you correct
This is c++ program of multiplying matrix .. also i computed each number in the output matrix with a separate thread .
cab you correct this program without deleting the lines of thread functions.
#include
printf(" Please insert the number of rows and columns for first matrix "); scanf("%d%d", &m, &n); // Read in the elements of the first matrix printf(" Insert your matrix elements : "); for (c = 0; c < m; c++) for (d = 0; d < n; d++) scanf("%d", &fst[c][d]); // Read in the number of rows and columns for the second matrix printf(" Please insert the number of rows and columns for second matrix "); scanf(" %d %d", &p, &q); // Check if the matrices can be multiplied if (n != p) printf(" Your given matrices cannot be multiplied with each other. "); else { // Read in the elements of the second matrix printf(" Insert your elements for second matrix "); for (c = 0; c < p; c++) for (d = 0; d < q;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started