C语言中用链表求城市坐标,c语言城市链表(C language city list).doc

c语言城市链表(C language city list)

c语言城市链表(C language city list)

# includes stdio.h > <

# includes stdlib.h > <

# includes string.h > <

# includes conio.h > <

# includes math.h > <

typedef struct q

{char [20].

int x;

int y;

struct q * prior;

struct q * next;

} node, * list.

list created ();

void find (list);

void (pos list);

void add (list);

void of (list);

void show (list);

void print ()

void main ()

(list l)

int t;

char c = y;

while ((c = = y is | | c = = y)

{system ("cls");

print ();

printf ("请输入:");

scanf ("% d" & t).

switch (t)

case 1: l = {created (); break;

case 2: find (l); break;

case 3: add (l); break;

case 4: ((l); break;

case 5: pos (l); break;

case 6: show (l); break;

}

printf ("输入y则继续操作, 输入其他则结束! \ n ");

c = getch ();

}

}

void print ()

{

printf ("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * the * * * * * * * * * * * * * * * \ n");

printf ("* * * * * * * * * * * * * * * * * * * * * * < 城市链表 > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * the * * * * * * * * \ n");

printf ("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * the * * * * * * * * * * * * * * * \ n");

printf ("* * * * * * * * * 按1: 输入城市信息 按2: 查找城市信息 * * * * * * * * * * * * \ n");

printf ("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * the * * * * * * * * * * * * * * * \ n");

printf ("* * * * * * * * * 按3: 增加一个城市信息 按4: 删除一个城市信息 * * * * * * * * \ n");

printf ("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * the * * * * * * * * * * * * * * * \ n");

printf ("* * * * * * * * * 按5: 查找小于等于某距离的所有城市信息 按6: 显示所有城市信息 * * * * * * * * \ n");

printf ("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * the * * * * * * * * * * * * * * * \ n");

printf ("* * *

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值