재우이 2018. 4. 18. 02:52




//163 : 배열2 - 형성평가4

#include<iostream>

using namespace std;


int main()

{

int arr[4][3] = { { 3, 5, 9 },{ 2, 11, 5 },{ 8, 30, 10 },{ 22, 5, 1 } };

int result   = 0;

for (int i = 0; i < 4; i++) {

for (int j = 0; j < 3; j++) {

cout << arr[i][j] << " ";

result += arr[i][j];

}

cout << '\n';

}

cout << result << '\n';

return 0;

}


문제 출처 : http://www.jungol.co.kr/bbs/board.php?bo_table=pbank&wr_id=63&sca=10a0