KakaoTalk_20190606_001802318.png
  • 246x0w
Welcome
Curriculum
Install&Go
Board
실제 작동 상태를 확인하려면 라이브 사이트로 이동하세요.
  • 카테고리
  • 전체 게시물
  • 내 게시물
parkmc1227
2020년 5월 27일

200527

게시판: 소스 코드 제출

#include<stdlib.h>

#include<stdio.h>

struct node {

int data;

struct node *next;

};

int main(){

struct node *start=NULL;

printf("Hello, World!\n");

int n;

while(1)

{

printf("1:insert/2:delete/3:search/4:print/else:end -> ");

scanf("%d",&n);

switch(n)

{

case 1:{

printf("Input: ");

scanf("%d",&n);

struct node *newa = (struct node*) malloc (sizeof(struct node));

newa->data=n;

if(start==NULL){

newa->next=NULL;

start=newa;

}

else if(n<=start->data){

newa->next=start;

start=newa;

}

else{


}

break;

}

case 2:

break;

case 3:

break;

case 4:{

printf("\n");

break;

}

default:

printf("Bye, World!");

return 0;

}

}

}

댓글 0개
0
댓글
댓글 0개
유사 게시물
  • 200527
  • 200527
  • 200527
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호