作业帮 > 综合 > 作业

麻烦翻译一下这个 C语言试题! 谢谢翻译一下试题就好

来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/04/30 02:56:06
麻烦翻译一下这个 C语言试题! 谢谢翻译一下试题就好
To calculate the circumference of a circle seems to be an easy task - provided you know its diameter. But what if you don't?
You are given the cartesian coordinates of three non-collinear points in the plane.
Your job is to calculate the circumference of the unique circle that intersects all three points.
Input
The input will contain one or more test cases. Each test case consists of one line containing six real numbers x1,y1, x2,y2,x3,y3, representing the coordinates of the three points. The diameter of the circle determined by the three points will never exceed a million. Input is terminated by end of file.
Output
For each test case, print one line containing one real number telling the circumference of the circle determined by the three points. The circumference is to be printed accurately rounded to two decimals. The value of pi is approximately 3.141592653589793.
Sample Input
0.0 -0.5 0.5 0.0 0.0 0.5
0.0 0.0 0.0 1.0 1.0 1.0
5.0 5.0 5.0 7.0 4.0 6.0
0.0 0.0 -1.0 7.0 7.0 7.0
50.0 50.0 50.0 70.0 40.0 60.0
0.0 0.0 10.0 0.0 20.0 1.0
0.0 -500000.0 500000.0 0.0 0.0 500000.0
Sample Output
3.14
4.44
6.28
31.42
62.83
632.24
3141592.65
Source
Ulm Local 1996
麻烦翻译一下这个 C语言试题! 谢谢翻译一下试题就好
若知道直径,求圆的周长看起来是件简单的事,如果不知道直径呢?
现给出平面上不共线的三个点的坐标.
你的工作是计算出由这三点确定的唯一圆的周长.
输入
输入包括一个或更多的测试题,每行测试题有六个实数x1,y1,x2,y2,x3,y3,代表了这三个点的坐标.由这三点确定的圆的直径永远不会超过100万.输入就是文件最后终止的内容.
输出
在每个测试题中,输出可以确定圆的三点的实数坐标,后面输出圆周长精确至位小数,π约等于3.141592653589793
输入范例
0.0 -0.5 0.5 0.0 0.0 0.5
0.0 0.0 0.0 1.0 1.0 1.0
5.0 5.0 5.0 7.0 4.0 6.0
0.0 0.0 -1.0 7.0 7.0 7.0
50.0 50.0 50.0 70.0 40.0 60.0
0.0 0.0 10.0 0.0 20.0 1.0
0.0 -500000.0 500000.0 0.0 0.0 500000.0
输出范例
3.14
4.44
6.28
31.42
62.83
632.24
3141592.65
资料来源:
Ulm Local 1996