i was wondering if I have two arrays:
int array1 [15][15]
int array 2 [15][15]
and I want to create a 3rd array
int array3 [15][15]
such that each cell in array3 is the product of the corresponding cells in array1 and array2.
So,
array3 [1][1] = array1 [1][1] * array [1][1];
array3 [1][2] = array1 [1][2] * array [1][2];
etc.
is there an easier way to do this? for example is:
array3 = array1*array2;
a valid way to express this or do I need to creat a loop?
2007-02-26
16:24:49
·
7 answers
·
asked by
cpine505
3
in
Computers & Internet
➔ Programming & Design