摘要: #include<stdio.h> bool IsPrime(int val) //这是一个函数的限制性下面main的部分然后在回来{ int i; for (i = 2; i < val; ++i) { if (val%i ==0) break; } if (i ==val) return tru 阅读全文
posted @ 2018-05-09 12:40 WhyNott 阅读(142) 评论(0) 推荐(0) 编辑
摘要: /*2018年2月10日23:25:52这是冒泡排序 i< len-1 因为len=6 所以需要比较五次 j <len-1-i 随着i的增大 后者梁和数字之间需要比较的次数越来越少 从开始的五个数字 到最后的前两个数字*/ # include <stdio.h> void sort(int *a,i 阅读全文
posted @ 2018-05-09 12:38 WhyNott 阅读(67) 评论(0) 推荐(0) 编辑
摘要: # include <stdio.h> # include <malloc.h># include <stdlib.h> typedef struct Node{ int data; //数据域 struct Node *pNext;//指针域 } NODE, *PNODE; //NODE 等价于 阅读全文
posted @ 2018-05-09 12:35 WhyNott 阅读(90) 评论(0) 推荐(0) 编辑
摘要: # include<stdio.h># include <malloc.h># include <stdlib.h> // 包含了exit函数 //定义了数据类型名字叫做 struct Arrstruct Arr{ int * pBase; //存储的数组第一个元素的地址 int len; //数组 阅读全文
posted @ 2018-05-09 12:33 WhyNott 阅读(418) 评论(0) 推荐(0) 编辑