#include <stdio.h>
#include <stdlib.h>

int main(){
    int n;
    scanf("%d", &n);
    if(n <= 0) return 1;    // 한 줄로 쓸 수도 있음
    int *arr = malloc(sizeof(int)* n);
    if(arr == NULL) return 1;
    for(int i = 0;i < n;i++){
        scanf("%d", &arr[i]);
    }
    for(int i = 0;i < n; i++){
        printf("%d ", arr[i]);
    }
    free(arr);
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: