上一页 1 ··· 69 70 71 72 73
摘要: List Reverse(List head) { if (head == NULL || head->Next == NULL) { return head; } List p; List q; List r; p = head; q = head->Next; head->Next = NULL; whi... 阅读全文
posted @ 2019-09-15 13:16 Tomorrow1126 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 1、用字符串记录数字 2、vector 阅读全文
posted @ 2019-09-08 10:43 Tomorrow1126 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 1、共用体 union 可以存储不同的数据类型,但只能同时存储其中的一种类型。 共用体每次只能存储一个值。 共用体的长度是其最大的成员的长度。 2、枚举 enum创建符号常量, enum spectrum {red ,yellow,blue=8,white};//0,1,8,9 枚举量默认从0开始, 阅读全文
posted @ 2019-09-06 15:27 Tomorrow1126 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 堆栈 #include<iostream> #define maxsize 1000 using namespace std; typedef struct SNode*Stack;//栈的顺序存储结构 struct SNode { int data[maxsize]; int top;//栈顶元素 }; void Push(Stack Ptrs, int item)//入栈 { if (Ptrs 阅读全文
posted @ 2019-09-06 10:23 Tomorrow1126 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 线性表的数组实现 #include const int max = 1000; using namespace std; typedef struct LNode *List; struct LNode { int Data[max]; int Last; }; List MakeEmpty() { List PtrL; PtrL = (List)malloc(... 阅读全文
posted @ 2019-09-06 10:22 Tomorrow1126 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 一种很简单的算法int MaxSub(int A[], int N) { int ThisSum, MaxSum; int i; ThisSum = 0; MaxSum = 0; for (int i = 0; i MaxSum) { MaxSum = ThisSum; } else... 阅读全文
posted @ 2019-09-06 10:21 Tomorrow1126 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”,要求按下列格式打印 所谓“沙漏形状”,是指每行输出奇数个符号;各行符号中心对齐;相邻两行符号数差2;符号数先从大到小顺序递减到1,再从小到大顺序递增;首尾符号数相等。 给定任意N个符号,不一定能正好组成一个沙漏。要求 阅读全文
posted @ 2019-08-12 14:34 Tomorrow1126 阅读(136) 评论(0) 推荐(0) 编辑
上一页 1 ··· 69 70 71 72 73
点击右上角即可分享
微信分享提示