Hi all how can i multiplay two arrays toger in C language
Array
Collapse
X
-
Assuming that i, z, and m are constants, then no. I am going to assume the following:Originally posted by ashtajint y[i],x[z],c[m];
int o;
for(o=0;o<i;o++ )
{
c[m]=y[i]*x[z];
printf("%d",c[m]);
}
is it right?- that i==z and z==m
- that you want to multiply the 0th element of y to the 0th element to x which is to be stored in the 0th element in c, the 1st element of y to the 1st element to x which is to be stored in the 1sr element in c, and so on.
In which case, in your loop, you don't want to index using the constants. You tell me, what index(s) do you want to use?
AdrianComment
Comment