You need to create your own functions for static and dynamic arrays. The user must enter an array and column. The program multiplies them and gives 2 answers: one for a static array, the other for a dynamic one, and they should be equal.
I sort of wrote my own function, but I don’t know how.
#include <stdio.h> #include <malloc.h> #define n 4 #define m 3 int fmass(double *mas,double *masw, int n1, int m1, double *masr) { int k,l,x; for(k=0,x=0;k<n1,x<n1;k++,x++) for(l=0,masr[k][l]=0.;l<m1;l++) masr[k][l]+=mas[k*m1][l]*masw[x]; return 0; } int fmasd(double **mas, double *masw, int n1, int m1, double **masr) { int k,l,x; for(k=0,x=0;k<n1,x<n1;k++,x++) for(l=0,masr[k][l]=0.;l<m1;l++) masr[k]+=mas[k][l]*masw[x]; return 0; } Please tell me what to do next.