⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 438 circum.cpp

📁 UVA Online Judge solutions to the problems
💻 CPP
字号:
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
    double  x1,y1,x2,y2,x3,y3;
    double a,b,c;
    double circum[100];
    double reqangle;
    int i=0,k;
    while(cin>>x1>>y1>>x2>>y2>>x3>>y3)
    {
    a=sqrt(pow((x3-x2),2) + pow((y3-y2),2));
    b=sqrt(pow((x1-x3),2) + pow((y1-y3),2));
    c=sqrt(pow((x1-x2),2) + pow((y1-y2),2));
    reqangle=sqrt(1- pow(((pow(b,2)+pow(c,2)-pow(a,2))/(2*b*c)),2));
    circum[i]=static_cast<double>(3.141592653589793*a)/reqangle;
    i++;
    }
    k=i;
    for(i=0;i<k;i++)
    cout<<setprecision(2)<<fixed<<circum[i]<<endl;
    system("pause");
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -