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;
}
大佬们帮忙看看