码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
一元多项式的表示及加减乘除运算
例如:如何实现用线性链表表示多项式的加法运算? 根据一元多项式相加的运算规则:对于两个一元多项式中所有指数相同的项,对应系数相加,若其和不为零,则构成“和多项式”中的一项;对于两个一元多项式中所有指数不相同的项,则分别复抄到“和多项式”中去。 #include #include #include typedef struct polyn { floa...
分类:其他好文   时间:2015-07-07 19:35:44    阅读次数:112
数组名作为函数参数(求学生平均成绩)
除了可以用数组元素作为函数参数外,还可以用数组名作为函数参数(包括实参和形参)应当注意的是:用数组元素作为实参时传递的是数组元素的值,而用数组名作为函数的实参,向形参(函数名或指针变量)传递的是数组首地址的值。 #include float average(float array[5]) { int i; float aver,sum=0; for(i=0;i<5;i++) sum+=...
分类:编程语言   时间:2015-07-07 19:32:26    阅读次数:210
链式存储(头插法、尾插法)
#include "stdio.h" #include "string.h" #include "ctype.h" #include "stdlib.h" #include "io.h" #include "math.h" #include "time.h" #define OK 1 #define ERROR 0 #define TRUE 1 #define FALSE 0 #define ...
分类:其他好文   时间:2015-07-07 19:30:46    阅读次数:260
链式表的非递减数列合并
/*包含头文件*/ #include #include #include /*宏定义和单链表类型定义*/ #define ListSize 100 typedef int DataType; typedef struct Node { DataType data; struct Node *next; }ListNode,*LinkList; void MergeList(Link...
分类:其他好文   时间:2015-07-07 19:30:12    阅读次数:121
线性表-顺序存储
#include "stdio.h" #include "stdlib.h" #include "io.h" #include "math.h" #include "time.h" #define OK 1 #define ERROR 0 #define TRUE 1 #define FALSE 0 #define MAXSIZE 20 /* 存储空间初始分配量 */ typedef in...
分类:其他好文   时间:2015-07-07 19:27:39    阅读次数:86
【排序算法模板】快速排序
1 #include 2 #include 3 using namespace std; 4 5 void quickSort(vector& nums, const int lpos, const int rpos) 6 { 7 if(lpos = key)16 ...
分类:编程语言   时间:2015-07-07 19:13:54    阅读次数:158
写一个system.data.entity的simpledatarepo,实现crudq这些功能,不需要引入entityframework,直接可以使用,用到objectset
note:you can delete reference of entityframework when using this classes.it`s just a simple repohelper.the code below can also include a getpagedlist ...
分类:其他好文   时间:2015-07-07 19:10:00    阅读次数:121
<16>【理解】数组元素作为函数参数+【掌握】数组名作为函数参数+【掌握】数组名作为函数参数的注意点
#include int sum(int x,int y){ return x+y;}void printNum(int x){ //判断x的值 if (x>0) { printf("%d\t",x); }else{ printf("0\t"); ...
分类:编程语言   时间:2015-07-07 19:07:14    阅读次数:155
<17>【掌握】冒泡排序代码实现+【掌握】选择排序代码实现
#include void maoPao(int arr[],int len){ int temp; //双重循环 for(int i=0;iarr[j+1]) { //交换 a[j] 和 a[j+1]的值 // 加减法 ...
分类:编程语言   时间:2015-07-07 19:06:07    阅读次数:146
输入一个数,求这个数重新排列最大数和最小数之差
#include #include int next_num(int x){ char s[10]; int a,b,n; sprintf(s,"%d",x); n=strlen(s); for (int i=0; is[j]) { cha...
分类:其他好文   时间:2015-07-07 18:52:57    阅读次数:112
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!