关于Ubuntu Linux系统下使用C的<math.h>问题
向大家请教一个问题:
第一个程序可以编译通过:
C/C++ code:
1 // P95: 2.编程题 (6)调用库函数编程求表达式cos(39.5度)+(e的2.916次幂)+(3.16的算数方根)
2
3 // The begining of C program: test03-06.c.
4
5 // Header files included.
6 #include <stdio.h>
7 #include <math.h>
8
9 // Macro definition.
10 #define PI 3.1415926
11
12 // Main function's declaration.
13 int main ( void )
14 {
15 long int temp=0;
16 float result=0.0;
17 result = cos(39.5*PI/180) + exp(2.916) + sqrt(3.16);
18 temp = (long int) (result * 100);
19 temp = (long int) ((result*100 - temp)*2 + temp);
20 result = temp / 100.0;
21 printf ( "Result: cos(39.5*PI/180) + exp(2.916) + sqrt(3.16) = %.2lf\n",
22 result );
23
24 return (0);
25 }
26
27 // The end of C program: test03-06.c.
28
第二个程序不能编译通过:
C/C++ code:
1 // P120: 3.编程题 (3)
2
3 // The begining of C program: t
相关问答:
分别用结构化方法和面向对象方法编程实现下面要求:
对Circle和Rectangle实现以下功能Center,Move,Rotate,Print.
自己先订以下,这是一个刚学习计算机的人问我的
学习,看看
继续顶哦
学习了。
go o ......
咨询QQ:269562808
bzip2recover
功能说明:用来修复损坏的.bz2文件。
语法:bzip2recover[.bz2压缩文件]
补充说明:bzip2是以区块的方式来压缩文件,每个区块视为独立的单位。因此,当某一区
块损坏时,便可利 ......
VC6.0不能用,VS系列太大,能不能推荐几款小巧的C/C++的IDE
没有。楼下的垃圾回答
http://topic.csdn.net/u/20100105/09/c854cc79-c8b0-4c1a-a8cf-9ab001ab13a5.html?76698
VC6.0我windows7能用
其他的
DEV ......
请我用FCK上传文件,在本地的windows机上测试可以,但部署到linux服务器上就上传不了文件,上传文件时一直卡在那里。望各位大虾指点,谢谢!
路过,帮你顶一下。。。。。。。。。。。。。。
上传文件的路径问题, ......