丫的红一片
查看原帖
丫的红一片
1612405
who_scat楼主2024/12/8 20:11

c语音,代码如下

#include<stdio.h>
#include<math.h>
int lengther(double a,double b,double c,double d)
{
    return sqrt((a-c)*(a-c)+(b-d)*(b-d));
}
int main()
{
    double a,b,c,d,e,f,sum=0;
    scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f);
    sum=lengther(a,b,c,d)+lengther(a,b,e,f)+lengther(c,d,e,f);
    printf("%.2lf",sum);
    return 0;
}

大佬们帮忙看看

2024/12/8 20:11
加载中...