08 2020 档案

摘要:/* 冒泡排序,从小到大 */ include<stdio.h> int main(void) { int i; int t; int p; int val; int a[6]; for(i = 0; i < 6; ++i) { printf("请输入第%d个元素的值为:", i+1); scanf 阅读全文
posted @ 2020-08-27 23:00 星空0125 阅读(170) 评论(0) 推荐(0)
摘要:数据结构概述(教材选用严蔚敏、吴伟民,该书程序是伪算法 具体的程序是高一凡,西电的,大牛,只有 程序。还有一本书,台湾的黄国瑜自己写的 只有思路,程序是另外一个合作的清华的写 的,可惜很多错的。) 学完数据结构之后会对面向过程的函数有一个更深的了解 定义 我们如何把现实中大量而复杂的问题以特定的数据 阅读全文
posted @ 2020-08-27 22:18 星空0125 阅读(221) 评论(0) 推荐(0)
摘要:include<stdio.h> include<malloc.h> typedef struct BTNode { char data;//存放节点 struct BTNode * pLchild;//左子树 struct BTNode * pRchild;//右子树 }BTNODE, * PBT 阅读全文
posted @ 2020-08-27 22:16 星空0125 阅读(168) 评论(0) 推荐(0)
摘要:include<stdio.h> f(int n) { if(1 == n) return 1; else return n * f(n-1); } int main(void) { int i; i = f(8); printf("8的阶乘:%d\n ", i); return 0; } 阅读全文
posted @ 2020-08-23 20:16 星空0125 阅读(209) 评论(0) 推荐(0)
摘要:include<stdio.h> f(int n) { if(1 == n) return 1; else return n + f(n-1); } int main(void) { int i; i = f(100); printf("1到100之和为:%d\n ", i); return 0; 阅读全文
posted @ 2020-08-23 20:13 星空0125 阅读(1487) 评论(0) 推荐(0)
摘要:include<stdio.h> include<malloc.h> typedef struct Queue { int * pBase; int front; int rear; }QUEUE,*PQUEUE; void init_queue(PQUEUE);//初始化 bool en_queu 阅读全文
posted @ 2020-08-23 17:18 星空0125 阅读(108) 评论(0) 推荐(0)
摘要:include<stdio.h> include<malloc.h> include<stdlib.h> typedef struct Node { int data; struct Node * pNext; }NODE, * PNODE; typedef struct Stack { PNODE 阅读全文
posted @ 2020-08-23 15:29 星空0125 阅读(119) 评论(0) 推荐(0)
摘要:include <stdio.h> include <malloc.h> include <stdlib.h>//包含了exit函数 include <windows.h> //定义了一个数据类型,未分配存储空间 struct Arr { int * pBase;//存储数组第一个元素的地址 int 阅读全文
posted @ 2020-08-22 22:09 星空0125 阅读(93) 评论(0) 推荐(0)
摘要:/* 乘法口诀输出 */ include<stdio.h> int main(void) { int i; int t; int q; for(i = 1; i < 10; ++i) { for(t = 1; t < i+1; ++t) { q = i * t; if(1<t<4 && 10>q) 阅读全文
posted @ 2020-08-21 20:33 星空0125 阅读(103) 评论(0) 推荐(0)
摘要:include<stdio.h> include<stdlib.h>//exit 的头文件,exit功能是终止该程序 include<malloc.h> typedef struct Node { int data; //数据域 struct Node * pNext; //指针域 } NODE, 阅读全文
posted @ 2020-08-18 19:59 星空0125 阅读(240) 评论(0) 推荐(0)