This section contains a brief introduction to the C language. It is intended as a tutorial on the language, and aims at getting a reader new to C started as quickly as possible. It is certainly not intended as a substitute for any of the numerous textbooks on C. 2. write a recursive function FIB (n) to find out the nth element in theFibanocci sequence number which is 1,1,2,3,5,8,13,21,34,55,…3. write the prefix and postfix form of the following infix expressiona + b – c / d + e * f – g * h / i ^ j4. write a function to count the number of nodes in a binary tr
标签: introduction the contains intended
上传时间: 2013-12-23
上传用户:liansi
Implemented BFS, DFS and A* To compile this project, use the following command: g++ -o search main.cpp Then you can run it: ./search The input is loaded from a input file in.txt Here is the format of the input file: The first line of the input file shoud contain two chars indicate the source and destination city for breadth first and depth first algorithm. The second line of input file shoud be an integer m indicate the number of connections for the map. Following m lines describe the map, each line represents to one connection in this form: dist city1 city2, which means there is a connection between city1 and city2 with the distance dist. The following input are for A* The following line contains two chars indicate the source and destination city for A* algorithm. Then there is an integer h indicate the number of heuristic. The following h lines is in the form: city dist which means the straight-line distance from the city to B is dist.
标签: Implemented following compile command
上传时间: 2014-01-01
上传用户:lhc9102
该源码是一个问题的解决方法。问题是给你个长为L的串,串中可以出现n种字符,还给出m个子串,求有多少个长为n的只由这些字串组成的串。输入例子:4 5 6 ABB BCA BCD CAB CDD DDA 结果为2.而5 4 5 E D C B A的结果为625
标签: 源码
上传时间: 2014-01-12
上传用户:水中浮云
编程序,按如下要求来求解n元一次线性方程组(假设方程组具有唯一解)。 (1)方程个数n之值由用户通过键盘输入; (2)方程组存放在“增广矩阵”A之中,而n行n+1列的A存储空间通过new来动态分配,且A的各元素值也由用户通过键盘输入; (3)方程组的解存放于“向量”B之中,而具有n个元素的B存储空间也通过new来动态分配。
标签: 编程
上传时间: 2014-11-06
上传用户:cjl42111
功能说明: 次组件提供的功能有二: 1、解析出数学表达式中的参数 2、计算数学表达式 此组件不但可以解析和计算数学表达式,还提供了一系列的数学基本函数,可应用于表达式中一块处理。提供的数学基本函数有:将值舍入到最接近的整数 rount(x)、向下取整函数 int(x)、向上取整 ceiling(x)、求两个数中最大数的函数 max(a,b)、求两个数中最小数的函数 min(a,b)、幂函数 pow(x,n)、求平方根的函数 sqrt(x)。 下载地址:http://www.qiusuo365.com/qiusuo365/viewthread.php?tid=2422&extra=page%3D1
上传时间: 2014-01-18
上传用户:李梦晗
一个随机数产生的MATLAB例子,内含三种随机数生成方法。[0,1]分布,N(0,1)正态分布,n个N(a,b)正态分布
上传时间: 2015-09-27
上传用户:yt1993410
本文件描述了一个基于串口实现文件传输的协议eXmodem,该协议基于标准Xmodem File Transfer Protocol,是一个独立标准,完全功能,全新的文件传输协议。 1)该协议除实现Xmodem File Transfer基本功能,即已实现了在两个设备相互之间,通过串口把一个设备内文件传输至另一个设备内;其增强功能所列参考如下: a)两个设备相互之间传输文件能够以一致的文件目录存放; b)两个设备相互之间可以传输任意大小的文件,而Xmodem File Transfer只能传送128 *n字节大小的文件; c)具备避免一个文件在两个设备相互之间重复传输的功能,提高了文件传输的效率。
上传时间: 2015-09-30
上传用户:LouieWu
C# BigInteger class. BigInteger.cs is a csharp program. It is the BIgInteger class. It has methods: abs() , FermatLittleTest(int confidence) ,gcd(BigInteger bi) , genCoPrime(int bits, Random rand) , genPseudoPrime(int bits, int confidence, Random rand) , genRandomBits(int bits, Random rand) , isProbablePrime(int confidence) , isProbablePrime() , Jacobi(BigInteger a, BigInteger b) , LucasSequence(BigInteger P, BigInteger Q, BigInteger k, BigInteger n) ,max(BigInteger bi) , min(BigInteger bi) , modInverse(BigInteger modulus) , RabinMillerTest(int confidence) ,
标签: BigInteger class BIgInteger program
上传时间: 2013-12-23
上传用户:ynzfm
牛顿法解多项式的根 输入:多项式系数c[],多项式度数n,求在[a,b]间的根 输出:根 要求保证[a,b]间有根
上传时间: 2013-12-21
上传用户:秦莞尔w
有一个魔王总是使用自己的一种非常精练而抽象的语言讲话,没有人能听得懂,但他的语言是可以逐步解释成人能听懂的语言,因为他的语言是由以下两种形式的规则由人的语言逐步抽象上去的: (1) α→β1β2…βm (2) (θδ1δ2…δn)→θδnθδn-1…θδ1θ 在这两种形式中,从左到右均表示解释。试写一个魔王语言的解释系统,用下述两条具体规则和上述规则形式(2)实现,把他的话解释成人能听得懂的话。 (1) B→tAdA (2) A→sae 设大写字母表示魔王语言的词汇;小写字母表示人的语言词汇;希腊字母表示可以用大写字母或小写字母代换的变量。魔王语言可含人的词汇。测试用例见题集p97。
上传时间: 2013-12-22
上传用户:ardager