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.

Closed due to the fact that off-topic participants ermak0ff , Max Mikheyenko , Alexey Shtanko , Nick Volynkin , LEQADA Nov 13 '15 at 20:06 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - ermak0ff, Max Mikheyenko, Alexey Shtanko, Nick Volynkin
If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

    I sort of wrote my own function, but I don’t know how.

    Write the main, write the creation of arrays and fill them with data, perhaps - input data from the keyboard and output the final result to the screen.