1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#include<iostream>
using namespace std;
int main()
{
const int m = 4;
const int n = 6;
int A[m][n] =
{
{1,2,3,4,5,8},
{4,3,5,2,7,6},
{1,2,4,5,6,4},
{3,4,5,7,8,5}
};
int mult = 1;
for(int r = 0; r < m; r++)
{
for(int c = 0; c < n; c++)
{
mult *= A[r][c];
}
}
cout <<"The result is: "<< mult;
cin.ignore();
cin.get();
return 0;
}
|