码迷,mamicode.com
首页 >  
搜索关键字:double    ( 12800个结果
双向链表的实现
上一篇博文介绍了如何使用C语言实现单链表,这篇博文介绍下双向链表的实现。单链表中每个结点只有一个后驱,而双向链表中每个结点都有一个后驱和前驱(除了第一个结点只有一个后驱,最后一个结点只有一个前驱)。双向链表中每个结点具有一个数据域和两个指向前一个结点和后一个结点的指针域。代码的实现: 首先得创建一个结点的结构体:Double_Node typedef struct Double_Node { ...
分类:其他好文   时间:2014-07-26 17:18:22    阅读次数:317
SICP 1.16 1.17 1.18
解: 公共过程 (define?(even??n) ??(=?(remainder?n?2)?0)) (define?(double?n) ??(+?n?n)) (define?(halve?n) ??(/?n?2)) 1.16: (define?(expt?b?n) ??(define?(iter?b?n?a) ...
分类:其他好文   时间:2014-07-26 15:41:42    阅读次数:232
【足迹C++primer】54、继承类的范围,构造函数和拷贝控制
继承类的范围,构造函数和拷贝控制 当用派生类执行函数的时候,首先会在当前的类里面找 如果找不到就一级一级地往上找。 Name Lookup Happens at Compile Time class Quote { public: Quote()=default; Quote(const string &book, double sales_price)...
分类:编程语言   时间:2014-07-26 15:29:42    阅读次数:542
C++ 结构简介
C++结构体定义struct inflatable{ char name[20]; float volume; double price;}C++创建结构本:inflatable guest={ "Glorious Gloria", 1.88, 29.99};在C中是要加上struc...
分类:编程语言   时间:2014-07-26 14:25:00    阅读次数:238
Double 与 Float 的值的比较结果
首先看geeksforgeeks上的两个程序: 程序1: #include int main() { float x = 0.1; if (x == 0.1) printf("IF"); else if (x == 0.1f) printf("ELSE IF"); else printf("ELSE"); } 程...
分类:其他好文   时间:2014-07-26 03:03:46    阅读次数:142
HDU 1864 最大报销额
注意数组的大小,以及字符的输入问题 #include #include int dp[4000000],a[4],money[400]; char s[120]; double str[120]; int max(int a,int b) {return a>b?a:b;} int main() { int N,sum,ans,ok,count,i,j,num; double Q...
分类:其他好文   时间:2014-07-26 02:38:26    阅读次数:253
JSP简单练习-javaBean的简单应用
/* * javaBean代码 */ package bean; public class Box { double length; double width; double height; public Box() { length=0; width=0; height=0; } public double getLength() { return lengt...
分类:编程语言   时间:2014-07-26 02:31:36    阅读次数:267
数据结构中常用树型结构简介
B树、B-树、B+树、B*树、红黑树rbtree 二叉排序树、trie树Double Array 字典查找树     B树        即二叉搜索树:        1.所有非叶子结点至多拥有两个儿子(Left和Right);        2.所有结点存储一个关键字;        3.非叶子结点的左指针指向小于其关键字的子树,右指针指向大于其关键字的子树;        ...
分类:其他好文   时间:2014-07-26 02:24:36    阅读次数:232
UVa1586,Molar Mass
#include #include #include using namespace std;int main(){double c,h,o,n;int t,i,j;cin>>t;getchar();double ans;char s[100];while (t-->0){gets(s);c=0;h...
分类:其他好文   时间:2014-07-26 01:47:46    阅读次数:248
boost thread
#include #include #include #include #include #include using namespace std;using namespace boost;void double_int(int & i){ i *= 2;}mutex io_mu;void pri...
分类:其他好文   时间:2014-07-26 00:59:46    阅读次数:253
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!