编程介的小学生 2019-08-27 18:31 采纳率: 20.5%
浏览 349

几何三角形问题,Triangle

Problem Description
A triangle is one of the basic shapes of geometry: a polygon with three corners or vertices and three sides or edges which are line segments.
Triangles can be classified according to the relative lengths of their sides:
· In an equilateral triangle all sides have the same length. An equilateral triangle is also a regular polygon with all angles measuring 60°.
· In an isosceles triangle, two sides are equal in length. An isosceles triangle also has two angles of the same measure; namely, the angles opposite to the two sides of the same length; this fact is the content of the Isosceles triangle theorem.
· In a scalene triangle, all sides are unequal. The three angles are also all different in measure. Some (but not all) scalene triangles are also right triangles.

Input
The first line of input contains an integer (1 <= T <= 100), the number of test cases. T test data sets follow, each data set consists of 3 integers A, B and C, where (1 <= A,B,C <= 1,000,000) the triangle side lengths.

Output
For each test case, print “equilateral”, “isosceles” or “scalene” describing the triangle type. If the input doesn’t create a valid triangle output “invalid!”. Follow the output format below.

Sample Input
2
3 3 4
6 4 2

Sample Output
Case #1: isosceles
Case #2: invalid!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 MATLAB动图的问题
    • ¥15 求差集那个函数有问题,有无佬可以解决
    • ¥15 【提问】基于Invest的水源涵养
    • ¥20 微信网友居然可以通过vx号找到我绑的手机号
    • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
    • ¥15 解riccati方程组
    • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
    • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
    • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
    • ¥50 树莓派安卓APK系统签名