攻城狮凌风

2014年8月29日

C/C++常用数学函数

摘要: math.h/cmath(C++)数学函数库 1 三角函数 double sin (double); double cos (double); double tan (double); 2 反三角函数 double asin (double); 结果介于[-PI/2,P... 阅读全文

posted @ 2014-08-29 16:55 攻城狮凌风 阅读(435) 评论(0) 推荐(0) 编辑

C++运算符优先级表

摘要: 点击此处 下载doc文件,可供打印 Precedence Operator Description Example Associativity 1 () [] -> . :: ++ -- Grouping operator Array access... 阅读全文

posted @ 2014-08-29 15:44 攻城狮凌风 阅读(201) 评论(0) 推荐(0) 编辑

2014华为机试,寻找丑数。

摘要: 题目:我们把只包括因子如2、3和5的数称作丑数(Ugly Number)。例如6、8都是丑数,但14不是,因为它包含因子7。习惯上我们把1当做是第一个丑数。外部输入n,输出按从小到大的顺序的第n(限定范围0-500)个丑数。当n在1-500的范围外,输出-1。 方案一 #include... 阅读全文

posted @ 2014-08-29 11:13 攻城狮凌风 阅读(196) 评论(0) 推荐(0) 编辑

导航