错在哪了,提示called object is not a function
#include<stdio.h>intmain(){floatx1,x2,x3,y1,y2,y3,l1,l2,l3,a,b,c;scanf("%f%f%f%f%f%f"...
#include <stdio.h>
int main()
{
float x1,x2,x3,y1,y2,y3,l1,l2,l3,a,b,c;
scanf("%f %f %f %f %f %f",&x1,&x2,&x3,&y1,&y2,&y3);
l1=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
l2=sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3));
l3=sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
a=abs(l1-l2);
b=abs(l2-l3);
c=abs(l1-l3);
if
(a<l3<l1+l2&&b<l1<l2+l3&&c<l2<l1+l3);
float L,S,p;
L=l1+l2+l3;
p=(1/2)*L;
S=sqrt(p(p-l1)(p-l2)(p-l3));
printf("L = .2%f,A = .2%f\n",L,S);
else
printf("Impossible\n");
return 0
} 展开
int main()
{
float x1,x2,x3,y1,y2,y3,l1,l2,l3,a,b,c;
scanf("%f %f %f %f %f %f",&x1,&x2,&x3,&y1,&y2,&y3);
l1=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
l2=sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3));
l3=sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
a=abs(l1-l2);
b=abs(l2-l3);
c=abs(l1-l3);
if
(a<l3<l1+l2&&b<l1<l2+l3&&c<l2<l1+l3);
float L,S,p;
L=l1+l2+l3;
p=(1/2)*L;
S=sqrt(p(p-l1)(p-l2)(p-l3));
printf("L = .2%f,A = .2%f\n",L,S);
else
printf("Impossible\n");
return 0
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询