求助大佬!全是WAo(╥﹏╥)o
查看原帖
求助大佬!全是WAo(╥﹏╥)o
1210664
Lindafish楼主2023/11/22 13:50
#include <stdio.h>

int main()
{
    double x1,y1,x2,y2,x3,y3;
    scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3);
    double a,b,c,p,s;
    a=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
    b=sqrt((x3-x1)*(x3-x1)+(y3-y1)*(y3-y1));
    c=sqrt((x2-x3)*(x2-x3)+(y2-y3)*(y2-y3));
    p=a+b+c;
    s=sqrt(p*(p-a)*(p-b)*(p-c));
    printf("%.2f",s);
    
    return 0;
    
}
2023/11/22 13:50
加载中...