#include <stdio.h>
/* 배열과 함수
void PrintArray(int a[], int size);
int main() {
int nums1[5] = { 7, 15, 10, 4, 11 };
PrintArray(nums1, 5);
return 0;
}
void PrintArray(int a[], int n) {
for(int i = 0; i < n; i++){
printf("%d ", a[i]);
}
}
*/
/* 2차원 배열 */
int main(){
int nums[2][3] = {
{10, 20, 30},
{40, 50, 60}
};
for(int i=0;i<2;i++){
for(int j=0;j<3;j++){
printf("%d ", nums[i][j]);
}
printf("\n");
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: