06장_배열과%20포인터

# Cpp 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: e ROW 3 #define COL 4 void main() { int a[ROW][COL] = { {90, 85, 95, 100}, {75, 95, 80, 90}, {90, 80, 70, 60} }; int r, c; cout<<"\n 이중 for 문으로 배열을 출력"; cout<<"\n ------------------------------\n"; for(r= 0; r<ROW; r++) { for(c= 0; c<COL; c++) cout<<" "<<a[r][c]; cout<<"\n"; } } - 11 - IT COOKBOOK [실습하기 6-5] 두 행렬의 합 구하기 IT COOKBOOK - 12 - [실습하기 6-5] 두 행렬의 합 구하기 IT COOKBOOK [예제 6-5] 6_5.cpp 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 #include<iostream> using namespace std; void main() { int a[3][4]={{10, 20, 30, 40}, {20, 40 ,60 ,80}, {10, 30, 50, 70} }; int b[3][4]={ { 1, 2, 3, 4}, { 5, 6, 7, 8}, { 9, 10 ,11 ,12} }; int c[3][4]; int row, col; for(row = 0; row < 3; row++) for(col = 0; col < 4; col++) c[row][col] = a[row][col]+ b[row][col]; cout<<" 두 행렬의 합을 출력하기"; cout<<"\n===================================\n"; for(row = 0; row <...
View Full Document

## This document was uploaded on 01/19/2014.

Ask a homework question - tutors are online