include iostream using namespace std int main int argc char argv int m

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
int m1[2][3] = {
{-3, 2, 5},
{1, 0, 4}
};
int m2[2][3] = {
{-1, 2, 1},
{0, 1, -1}
};
int result[2][3] = {
{m1[0][0] + m2[0][0], m1[0][1] + m2[0][1], m1[0][2] + m2[0][2]},
{m1[1][0] + m2[1][0], m1[1][1] + m2[1][1], m1[1][2] + m2[1][2]},
};
cout << result[0][0] << "\t" << result[0][1] << "\t" << result[0][2] << endl;
cout << result[1][0] << "\t" << result[1][1] << "\t" << result[1][2] << endl;
system("PAUSE");
return 0;
}