快捷导航

一道编程题,求大神指点

DescriptionYou work for an art store that has decided to carry every style and size of drafting triangle in existence. Unfortunately, sorting these has become a problem. The manager has given you the task of organizing them. You have decided to classify them by edge length and angles. To measure each triangle, you set it on a large sheet of very accurate graph paper and record the coordinate of each point. You then run these three points through a computer program to classify the triangles according to: Scalene no equal sides Isosceles two equal sides Equilateral three equal sides and Acute all angles under 90 Right one angle equal 90 Obtuse one angle over 90 Of course, sometimes you make mistakes entering the data, so if you input points that do not form a valid triangle, your program should tell you.InputOne triangle is described per line. Each line has six measurements taken to the nearest 0.001 in the order: x1 y1 x2 y2 x3 y3 The final line of input will contain only a -1. None of the test sets contain non-right angles in the range 88-92 degrees, nor do any of the test sets include any non-equal side lengths for one triangle within 0.01 of one another.OutputYou will output one line for each triangle, which will contain two words: < length classification > < angle classification > or Not a Triangle The final line of your output file will be: End of OutputSample Input10.000 10.000 10.000 20.000 20.000 10.0000.000 0.000 4.000 0.000 2.000 3.464-1Sample OutputIsosceles RightEquilateral AcuteEnd of Output这道题怎么做,求大神

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

参与会员2

I do not know
回复

使用道具 举报

666
回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP