C++完美演绎 经典算法 如 /* 头文件:my_Include.h */ #include <stdio.h> /* 展开C语言的内建函数指令 */ #define PI 3.1415926 /* 宏常量,在稍后章节再详解 */ #define circle(radius) (PI*radius*radius) /* 宏函数,圆的面积 */ /* 将比较数值大小的函数写在自编include文件内 */ int show_big_or_small (int a,int b,int c) { int tmp if (a>b) { tmp = a a = b b = tmp } if (b>c) { tmp = b b = c c = tmp } if (a>b) { tmp = a a = b b = tmp } printf("由小至大排序之后的结果:%d %d %d\n", a, b, c) } 程序执行结果: 由小至大排序之后的结果:1 2 3 可将内建函数的include文件展开在自编的include文件中 圆圈的面积是=201.0619264
标签: my_Include include define 3.141
上传时间: 2014-01-17
上传用户:epson850
一元稀疏多项式计算器[加法和乘法] 问题描述: 设计一元系数多项式计数器实现两个多项式间的加法、减法。 基本要求: (1) 输入并建立多项式 (2) 输出多项式,输出形式为整数序列:n,c1,e1,c2,e2……cn,en,其中n是多项式的项数,ci,ei分别为第i项的系数和指数。序列按指数降序排列。 (3) 多项式a和b相加,建立多项式a+b,输出相加的多项式。 (4) 多项式a和b相减,建立多项式a-b,输出相减的多项式。 用带表头结点的单链表存储多项式。 测试数据: (1) (2x+5x8-3.1x11)+(7-5x8+11x9) (2) (6x-3-x+4.4x2-1.2x9)-(-6x-3+5.4x2+7.8x15) (3) (x+x2+x3)+0 (4) (x+x3)-(-x-x-3)
上传时间: 2013-12-03
上传用户:561596
DTMF编码芯片HT9200的51接口程序。输入参数R2表示发送数据个数,输入数据与发送数据与DTMF码的关系:00H-0 01H-1 02H-2 03H-3 04H-4 05H-5 06H-6 07H-7 08H-8 09H-9 0AH-A 0BH-B 0CH-C 0DH-D 0EH-* 0FH-#。详细说明参考文件内
上传时间: 2014-11-12
上传用户:电子世界
A.执行SPLIB B.执行SPDOS C.装载拼音模块D.装载五笔字型输入模块32.在汉字输入状态下, 按下Shift+A组合键后,输入了_______。 ... A.按原代码方式B.按指定字体C.按标准方式D. 按分栏方式41.FoxBASE启动后,在圆点"."提示符下,执行命令文件MAIN.
上传时间: 2015-04-02
上传用户:极客
用Matlab软件以及雅克比迭代和高斯-赛德尔迭代解方程组Ax=b,分析、比较其结果
上传时间: 2015-04-04
上传用户:123456wh
算法ebook(10部算法经典著作的合集) 算法ebook> 10部算法经典著作的合集 chm格式 (1)Fundamentals of Data Structures by Ellis Horowitz and Sartaj Sahni (2)Data Structures, Algorithms and Program Style Using C by James F. Korsh and Leonard J. Garrett (3)Data Structures and Algorithm Analysis in C by Mark Allen Weiss (4)Data Structures: From Arrays to Priority Queues by Wayne Amsbury (5)Information Retrieval: Data Structures & Algorithms edited by William B. Frakes and Ricardo Baeza-Yates (6)Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson, and Ronald L. Rivest (7)Practical Data Structures in C++ by Bryan Flamig (8)Reliable Data Structures in C by Thomas Plum (9)Data Structures and Algorithms Alfred V. Aho, Bell Laboratories, Murray Hill, New Jersey John E. Hopcroft, Cornell University, Ithaca, New York Jeffrey D. Ullman, Stanford University, Stanford, California (10)DDJ Algorithms and Data Structures Articles
标签: ebook Fundamentals Structures Ellis
上传时间: 2015-04-04
上传用户:tfyt
输入一个四位数,共八次机会,A代表数字和位置均正确,B代表数字正确,但位置不正确.比如:A2B1代表三个数字正确,两个位置也正确
上传时间: 2013-12-11
上传用户:ukuk
一种新的pca方法,2dpca,有中科院的ppt及相关资料
标签: pca
上传时间: 2015-04-06
上传用户:cazjing
模式识别PCA+LDA的C++源代码,用于图像的主分量分析
上传时间: 2015-04-08
上传用户:cazjing
http://www.edacn.net/cgi-bin/forums.cgi?forum=7&topic=9127下,则R3~R0的输出信号中会有一个为1,但我们还是是无法确定哪一个键被按下,必須要从R3 ~R0 的输出信号与C3~C0的扫描信号共同決定那个按键被按下. 编写VHDL的构思: 外部接口包括: a. INPUT脚 : CLK , R3~R0. b. OUTPUT脚 : C3~C0 , DATA3~DATA0(辨别出的按键值).
标签: cgi-bin forums edacn forum
上传时间: 2015-04-09
上传用户:zm7516678