본문 바로가기
카테고리 없음

다차원 배열 활용

by 섭이블로그 2022. 9. 4.

#include<stdio.h>
#include<string.h>
#include<iostream>
using namespace std;

void main() {

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

for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
{
cout << a[i][j] << " ";
}
cout << endl;
}

}