Question
if anyone sees the answer to this question please change it a bit This is my code for c language, could you answer as soon
if anyone sees the answer to this question please change it a bit
This is my code for c language, could you answer as soon as possible
#include
void input() { printf("Enter number of rows and columns of first matrix "); scanf("%d%d", &m, &n); printf("Enter elements of first matrix "); for (c = 0; c < m; c++) for (d = 0; d < n; d++) scanf("%d", &first[c][d]); printf("Enter number of rows and columns of second matrix "); scanf("%d%d",&p, &q); printf("Enter elements of second matrix "); for (c = 0; c < n; c++) for (d = 0; d < q; d++) scanf("%d", &second[c][d]); }
void output(){
for (c = 0; c < m; c++) { for (d = 0; d < q; d++) printf("%d\t", multiply[c][d]); printf(" "); } }
int main() { input(); for (c = 0; c < m; c++) { for (d = 0; d < q; d++) { for (k = 0; k < p; k++) { sum = sum + first[c][k]*second[k][d]; } multiply[c][d] = sum; sum = 0; } } printf("Product of the matrices: "); output(); }
the task is to draw a structure chart that shows how the two functions developed are called in the main function. In the chart, you need to show what the arguments are and how they are passed in/out of the two functions. Also Modify the current program so the new code will perform matrix-vector product Ax.
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