自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 【C语言学习】图的操作模板

//图#include<stdio.h>#include<stdlib.h>#define MaxInt 35500//极大值#define MaxNum 100//最大顶点数typedef char VerTexType;//数据类型typedef int ArcType;//权值类型(有可能是浮点数)//邻接矩阵typedef struct { VerTexType vexs[MaxNum];//顶点数组 ArcType arcs[Max

2021-12-02 03:01:14 210 1

原创 【C语言学习】树的操作模板

//链二叉树#include<stdio.h>#include<stdlib.h>typedef struct elementtype{int tyint;char tychar;}ElementType;typedef struct tree{ElementType data;struct tree* lChild;struct tree* rChild;}Tree;Tree* CreatNode(ElementType data){Tree* ne

2021-11-24 22:07:04 265

原创 【C语言学习】队列的基本操作模板

//顺序队#include<stdio.h>#include<stdlib.h>#define MaxSize 1000typedef struct elementtype{ int tyint; char tychar;}ElementType;typedef struct queue{ ElementType* base; int front; int rear;}Queue;Queue* CrateQueue()

2021-11-16 00:14:54 977

原创 【C语言学习】栈的操作模板

【C语言学习】栈的操作模板#include<stdio.h>typedef struct node{ int data; struct node *next; }Node; typedef struct stack{ Node * stackTop; int stackSize;}Stack;Node * CrateNode(int data){ Node* newNode=(Node*)malloc(sizeof(Node));

2021-11-10 16:10:36 281

原创 【C语言学习】单链表的创建、增删、交换、排序

【C语言学习】单链表的创建、增删、交换、排序相对于数组,链表可以动态地更改大小,但它也无法像数字那样根据角标进行索引,几乎所有操作都要从头节点开始遍历。若头节点频繁改变,则会使其他操作变得更加棘手。所以干脆不让头节点存放有效数据,不参与其他操作,来保证每个链表的头指针固定不变,也可以用头节点储存链表长度。#include<stdio.h>#include<stdlib.h>typedef struct node{ int data; struct node* nex

2021-04-28 23:20:32 154 1

原创 【c语言学习】利用基础语句实现贪吃蛇

【C语言学习】利用基础语句实现贪吃蛇1、利用结构体数组储存蛇身每一个坐标;2、利用二维数组检查蛇头是否触碰是否、边界或身体;3、头部打印字符,尾部打印空格实现移动,尾部不打印实现增长;4、利用循环保持运动状态,当有读入时,根据读入改变运动状态;5、利用sleep函数控制运动速度;#include<stdio.h>#include<stdlib.h>#include<conio.h>#include<windows.h>#include&lt

2021-04-28 22:56:35 233

原创 【C语言学习】利用基础语句实现2048

【C语言学习】利用基础语句实现2048基本逻辑就是二维数组储存数据;读入字符完成操作;每次读入操作后,清空上次内容,打印新内容;#include<stdio.h>#include<stdlib.h>#include<conio.h>#include<time.h>#include<string.h>int a[5][5],compi[5][5];int flag = 0;int makerand(){ return r

2021-04-28 22:44:02 68

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除