c语言 the area,C语言 编写三角形面积计算/*计算三角形面积*/#include double sin(double x);#define PI 3.14159265int main(){d...

本文档描述了一个使用C语言编写的计算三角形面积的程序,该程序在链接阶段遇到了未解析外部符号'sin'的错误。程序尝试通过输入两边长度和夹角来计算面积,但链接器无法找到'sin'函数的实现导致编译失败。问题可能在于缺失数学库的链接选项。
摘要由CSDN通过智能技术生成

b357216499010bdf2c78f9eb61d172be.pngC语言 编写三角形面积计算/*计算三角形面积*/#include double sin(double x);#define PI 3.14159265int main(){double a,b,ang_c,s;scanf("%lfa=3%lfb=4%lfc=45",&a,&b,&ang_c);s = a * b * sin(ang_c * PI / 180.0) / 2.0;printf("The area is %f\n"

2015-11-12

C语言 编写三角形面积计算

/*计算三角形面积*/

#include

double sin(double x);

#define PI 3.14159265

int main()

{

double a,b,ang_c,s;

scanf("%lfa=3%lfb=4%lfc=45",&a,&b,&ang_c);

s = a * b * sin(ang_c * PI / 180.0) / 2.0;

printf("The area is %f\n",s);

return 0;

}

————————————————————————————————————————————————————————————————————————————————————————————

Linking...

求三角形面积.obj :error LNK2001:unresolved external symbol "double __cdecl sin(double)" sin@@YANN@Z)

Debug/求三角形面积.exe :fatal error LNK1120:1 unresolved externals

Error executing link.exe.

求三角形面积.exe - 2 error(s),0 warning(s)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值