#include <stdio.h>
int main() {
int a=1, b=2, c=3;
printf("%d\t",a);
printf("%d\t",b);
printf("%d\n",c);
int array[8] = {0, 0, 0, 0, 0, 0, 0, 0}; //배열 선언과 초기화
array[2] = 20;
printf("%d\n", array[2]);
int i;
for(i=0;i<8;i++){
printf("%d ", array[i]);
}
printf("\n-----자리 배치-----\n"); //설명해오기
int seat[8];
for(i=0;i<8;i++){
scanf("%d", &seat[i]);
}
seat[1] = 100;
//자리(배열) 출력
for(i=0;i<8;i++){
printf("%d ", seat[i]);
if(i==3){
printf("\n");
}
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: