三角形的内心代码(c)
#include<stdio.h>#include<math.h>
int main()
{
double(x1,x2,x3,y1,y2,y3,x,y,a,b,c);
scanf(%lf%lf%lf,&x1&x2&x3);
scanf(%lf%lf%lf,&y1&y2&y3);
a=sqrt((x2-x1)^2+(y2-y1)^2);
b=sqrt((x3-x1)^2+(y3-y1)^2);
c=sqrt((x3-x2)^2+(y3-y2)^2);
x=(a*x1+b*x2+c*x3)/(a+b+c);
y=(a*y1+b*y2+c*y3)/(a+b+c);
printf(“%.2f”,x,y);
}