现在的位置: 首页 > 综合 > 正文

2242

2013年10月15日 ⁄ 综合 ⁄ 共 357字 ⁄ 字号 评论关闭

#include#include#includeusing namespace std;double a,b,c,p,s,d,l;int main(){ double x0,y0,x1,y1,x2,y2; while(cin>>x0>>y0>>x1>>y1>>x2>>y2) { a=sqrt((x0-x1)*(x0-x1)+(y0-y1)*(y0-y1)); b=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); c=sqrt((x0-x2)*(x0-x2)+(y0-y2)*(y0-y2));
p=(a+b+c)/2; s=sqrt(p*(p-a)*(p-b)*(p-c)); d=a*b*c/(2*s); l=d*3.141592653589793; printf("%.2lf\n",l); } return 0;}

抱歉!评论已关闭.