cjlmcxw 发表于 2008-12-21 08:33:54

谁能看一下该程序错在那里?

谁能看一下该程序错在那里:
求x的反正切值

#define pi3.1415926
#include <math.h>

D_L=atan(x)*(double(180/pi));试后有如下提示:
chong.c - 5 errors
1132, 32 syntax error; found 'integer constant' expecting ')'.
1132, 32 syntax error; found 'integer constant' expecting ')'.
1132, 35 Cast from 'int' to 'double function' is illegal.
1132, 38 syntax error; found ')' expecting ';'.
1132, 38 Illegal statement termination.

cpubbs 发表于 2008-12-21 23:55:18

atan(x)*((double)(180/pi));

这样试试!
页: [1]
查看完整版本: 谁能看一下该程序错在那里?