没有合适的资源?快使用搜索试试~ 我知道了~
The Circumference of the Circle
需积分: 1 0 下载量 12 浏览量
2013-05-10
12:35:43
上传
评论
收藏 679B CPP 举报
温馨提示
#include <iostream> #include <math.h> #include<stdio.h> using namespace std; int main(){ const double pi = 3.141592653589793; double x1,y1,x2,y2,x3,y3,cosA; double a,b,c; while(scanf("%lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3)!=EOF) { a = (double)sqrt((y2-y1)*(y2-y1)+(x2-x1)*(x2-x1)); b = (double)sqrt((y3-y1)*(y3-y1)+(x3-x1)*(x3-x1)); c = (double)sqrt((y2-y3)*(y2-y3)+(x2-x3)*(x2-x3)); cosA = (b*b+c*c-a*a)/(2*b*c); printf("%.2f\n",pi*a/sqrt(1-cosA*cosA)); } return 0; }
资源推荐
资源评论
资源评论
章鱼鱼的ACM
- 粉丝: 9
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功