⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 link.cpp

📁 Stack, queue, sorting exmaples in C/C++.
💻 CPP
字号:
#include<stdio.h>
#include<conio.h>
#include<iostream.h>

struct node{
	int item;
	struct node *next;
	};

typedef struct node NADE;
NADE *start,*cur;

void create()
{
   int i;
   cur=new node;

   printf("enter the num");
   scanf("%d",&i);
   cur->item=i;
   start=cur;
   scanf("%d",&i);

while(i!=-99)
   {
    cur->next=new node;
    cur=cur->next;
    cur->item=i;
    scanf("%d",&i);
    }
cur->next=NULL;
cur=start;
}

void display()
{
 NADE *nod=start;
 while(nod!=NULL)
 {
  printf("[%d] =>",nod->item);
  nod=nod->next;
  }
  printf("NULL");
  }

  void main()
  {
    create();
    display();
    getch();
    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -