Array multiplication problem

int arr [3] [3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};

Write a few lines of code (not a separate function) that will find the product of rows 0 and 1 of arr. Print the product.



FYI, the product is 720.
FYI, it's polite to say "please" when issuing orders to strangers on the internet.
oh im sorry about that
closed account (D80DSL3A)
Use a variable to hold the product
int prod = 1;
Then put the following in a for loop
1
2
prod *= arr[0][i];
prod *= arr[1][i];
thanks fun2code, appreciate it :)
closed account (D80DSL3A)
You're welcome. Glad that was enough to solve the problem.
Topic archived. No new replies allowed.