数据结构+C语言
前端小白的逆袭
实践是检验代码的唯一标准。。。
展开
-
c语言-职工管理系统(读文件)-洋葱先生-杨少通
注:本程序由Visual Studio 2015编写,与VC++6.0稍有区别,复制到VC++6.0注释掉“#include “stdafx.h””即可运行,复制到VS可直接运行。注意下载的文本文件存放的路径和代码中文件的路径需要统一。代码如下:#include “stdafx.h”#include#include <stdlib.h>#include<stdio.h>#include #include <conio.h>#define MAXSIZ原创 2020-09-20 18:38:08 · 219 阅读 · 0 评论 -
rand()随机函数使用方法-洋葱先生-杨少通
注:本程序由Visual Studio 2015编写,与VC++6.0稍有区别,复制到VC++6.0注释掉“#include “stdafx.h””即可运行,复制到VS可直接运行。#include “stdafx.h”#include #include <stdlib.h>#include <time.h>int main(){int i;//时间种子,从1900年1月1日到现在的时间秒数,使rand()产生一个随机数srand((unsigned)time(NUL原创 2020-09-20 17:56:43 · 388 阅读 · 0 评论 -
数据结构 各种排序排列100000个数所需的是时间-洋葱先生-杨少通
注:本程序由Visual Studio 2015编写,与VC++6.0稍有区别,复制到VC++6.0注释掉“#include “stdafx.h””即可运行,复制到VS可直接运行。#include “stdafx.h”#include #include <stdlib.h>#include <time.h>#include<process.h>#include <Windows.h>using namespace std;#define OK原创 2020-09-20 17:24:42 · 1606 阅读 · 2 评论 -
c语言 time()和difftime()的使用-洋葱先生-杨少通
注:本程序由Visual Studio 2015编写,与VC++6.0稍有区别,复制到VC++6.0注释掉“#include “stdafx.h””即可运行,复制到VS可直接运行。#include “stdafx.h”#include <time.h>#include <Windows.h>int main(){time_t t1, t2;t1 = time(NULL);//线程睡眠两秒Sleep(2000);t2 = time(NULL);printf(“耗时原创 2020-09-20 17:22:53 · 285 阅读 · 0 评论 -
数据结构(C语言) 顺序查找和二分查找-洋葱先生-杨少通
数据结构(C语言) 顺序查找和二分查找实现功能:在顺序表中,通过关键字进行顺序查找和二分查找,若查找成功,则列出相关信息,否则提示查找失败!代码如下:#include “stdafx.h”#include #include <malloc.h>using namespace std;typedef int keyType;typedef struct {keyType key; //关键字域char name[10]; //姓名 属性域int age; //年龄 属性原创 2020-09-19 18:40:40 · 669 阅读 · 0 评论 -
C语言 井字棋游戏-洋葱先生-杨少通
C语言 井字棋游戏编写代码实现人机对战的“井字棋游戏”实现功能如下:①可查看游戏说明②可以自由进行多局游戏③程序健壮性良好、界面美观、清晰代码如下:#include<stdio.h>#include<stdlib.h>#include<time.h>//输出棋牌以及已落下的棋子void write(char(play)[11]){system(“cls”); //清屏函数system(“color BD”);printf("原创 2020-09-18 20:43:35 · 321 阅读 · 0 评论 -
数据结构C 图的深度优先遍历、广度优先遍历-洋葱先生-杨少通
数据结构C 图的深度优先遍历、广度优先遍历注:本程序由Visual Studio 2015编写,与VC++6.0稍有区别,复制到VC++6.0注释掉“#include “stdafx.h””即可运行,复制到VS可直接运行。存在错误,尽请谅解 ,仅供参考。// ConsoleApplication1.cpp : 定义控制台应用程序的入口点。//#include “stdafx.h”#include #include <stdio.h>#define ERROR 0#define O原创 2020-09-18 20:42:33 · 315 阅读 · 0 评论 -
(C语言)二叉树层序遍历求深度-洋葱先生-杨少通
注:本程序由Visual Studio 2015编写,与VC++6.0稍有区别,复制到VC++6.0注释掉“#include “stdafx.h””即可运行,复制到VS可直接运行。#include “stdafx.h”#include #define OK 1#define ERROR 0#define OVERFLOW -1#define UNDERFLOW -2using namespace std;typedef char TElemType;typedef int Status;原创 2020-09-15 19:41:26 · 573 阅读 · 0 评论 -
(C语言)二叉树的基本操作(遍历,求深度,求结点数,求子结点)-洋葱先生-杨少通
注:本程序由Visual Studio 2015编写,与VC++6.0稍有区别,复制到VC++6.0注释掉“#include “stdafx.h””即可运行,复制到VS可直接运行。#include “stdafx.h”#include #define OK 1#define ERROR 0#define OVERFLOW -1#define UNDERFLOW -2using namespace std;typedef char TElemType;typedef int Status;原创 2020-09-15 19:40:38 · 700 阅读 · 0 评论 -
(C语言)实验二:十进制转换R进制、回文、栈逆置队、括号匹配-洋葱先生-杨少通
C语言,c语言十进制转r进制整数部分,编写函数,将十进制转换成r进制,进制转换(C语言)实验二:十进制转换R进制、回文、栈逆置队、括号匹配-洋葱先生-杨少通原创 2020-09-15 19:39:51 · 555 阅读 · 0 评论 -
(C语言)栈实现队列元素逆置-洋葱先生-杨少通
注:本程序由Visual Studio 2015编写,与VC++6.0稍有区别,复制到VC++6.0注释掉“#include “stdafx.h””即可运行,复制到VS可直接运行。#include “stdafx.h”#include <stdio.h>#include using namespace std;#define OK 1#define ERROR 0#define OVERFLOW -1#define UNDERFLOW -2#define STACK_INIT_原创 2020-09-15 19:39:06 · 1363 阅读 · 1 评论 -
(C语言)判断字符串是否中心对称-洋葱先生-杨少通
注:本程序由Visual Studio 2015编写,与VC++6.0稍有区别,复制到VC++6.0注释掉“#include “stdafx.h””即可运行,复制到VS可直接运行。#include “stdafx.h”#include <stdio.h>#include #include <string.h>using namespace std;#define OK 1#define ERROR 0#define OVERFLOW -1#define UNDERF原创 2020-09-15 19:37:45 · 1882 阅读 · 0 评论 -
(C语言)十进制转换成R进制-洋葱先生-杨少通
注:本程序由Visual Studio 2015编写,与VC++6.0稍有区别,复制到VC++6.0注释掉“#include “stdafx.h””即可运行,复制到VS可直接运行。#include “stdafx.h”#include <stdio.h>#include using namespace std;#define OK 1#define ERROR 0#define OVERFLOW -1#define UNDERFLOW -2#define STACK_INIT_原创 2020-09-15 19:36:58 · 1329 阅读 · 0 评论 -
(C语言)判断表达式中括号是否匹配-洋葱先生-杨少通
注:本程序由Visual Studio 2015编写,与VC++6.0稍有区别,复制到VC++6.0注释掉“#include “stdafx.h””即可运行,复制到VS可直接运行。#include “stdafx.h”#include <stdio.h>#include #include <string.h>using namespace std;#define OK 1#define ERROR 0#define OVERFLOW -1#define UNDERF原创 2020-09-15 19:36:03 · 1946 阅读 · 0 评论 -
(C语言)判断表达式中括号是否匹配考生管理系统(链表)-洋葱先生-杨少通
注:本程序由Visual Studio 2015编写,与VC++6.0稍有区别,复制到VC++6.0注释掉“#include “stdafx.h””即可运行,复制到VS可直接运行。#include “stdafx.h”#include “iostream”#include “string”#define OK 1#define ERROR 0using namespace std;typedef int status;typedef struct {int examnum;string原创 2020-09-15 19:34:01 · 135 阅读 · 0 评论 -
(顺序表)两个集合求并集-洋葱先生-杨少通
(顺序表)两个集合求并集,C语言就合并集原创 2020-09-14 09:53:35 · 1383 阅读 · 0 评论 -
顺序表的12种基本操作-洋葱先生-杨少通
顺序表的操作,顺序表的增删改查原创 2020-09-14 09:51:02 · 156 阅读 · 0 评论