top of page

소스 코드 제출

공개·회원 72명

손유준손유준

20251213

#include <stdio.h>

#include <stdlib.h>


typedef struct node {

    int data;

    struct node *link;

} Node;


int main() {

    int N, i, value;

    Node *head = NULL;

    Node *tail = NULL;


    scanf("%d", &N);


    for (= 0; i < N; i++) {

        Node = (Node)malloc(sizeof(Node));

        scanf("%d", &value);


        x->data = value;

        x->link = NULL;


        if (head == NULL) {

            head = x;

            tail = x;

        } else {

            tail->link = x;

            tail = x;

        }

    }


    return 0;

}


🚀 소스 테스트 해보기

7회 조회
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546 ,     031) 215 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호
bottom of page