输入三角形的三边长,求三角形的面积。已知三角形的面积公式为area=根号下s*(s-a)*(s-b

2024-12-27 09:56:00
推荐回答(1个)
回答1:

include
int a,b,c;
real s,area;
void main()
{ print("Input A,B,C");
write("a,b,c");
s=0.5*(a+b+c);
area=sqrt(s*(s-a)*(s-b)*(s-c));
print("Output=\n");
print("S=",s," Area=",area);
}