main.c

来自「数据结构课程设计报告,虽然好多地方都有」· C语言 代码 · 共 37 行

C
37
字号
#include <stdio.h>
#include <stdlib.h>
#include "operate_Lqueue.h"

main()
{
	int scan_switch,scan_max;
	Queue_p *Strat;
	L_queue *s_queue;
	s_queue=(L_queue *)malloc(sizeof(L_queue));
	s_queue->next=NULL;
	Strat=(Queue_p *)malloc(sizeof(Queue_p));

	while(1)
	{
		printf("1.建立front/rear指针,空表\n");
		printf("2.入队列\n");
		printf("3.显示队列\n");
		printf("4.出队列\n");
		printf("选择操作码:");
		scanf("%d",&scan_switch);
		switch(scan_switch)
		{
		case 1:
			Emplty_Queue(Strat,s_queue);break;
		case 2:
			{
				printf("输入元素个数:");
				scanf("%d",&scan_max);
				Insert_Queue(Strat,scan_max);
			}break;
		case 3:Out_Queue(Strat);break;
		case 4:Push_Queue(Strat);break;
		}
	}
}

⌨️ 快捷键说明

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