Canadian Computing Competition: 2014 Stage 1, Junior #1
You have trouble remembering which type of triangle is which. You write a program to help. Your program reads in three angles (in degrees).
- If all three angles are
, outputEquilateral
. - If the three angles add up to
and exactly two of the angles are the same, outputIsosceles
. - If the three angles add up to
and no two angles are the same, outputScalene
. - If the three angles do not add up to
, outputError
.
Input Specification
The input consists of three integers, each on a separate line. Each integer will be greater than
Output Specification
Exactly one of Equilateral
, Isosceles
, Scalene
or Error
will be printed on one line.
Sample Input 1
Copy
60
70
50
Output for Sample Input 1
Copy
Scalene
Sample Input 2
Copy
60
75
55
Output for Sample Input 2
Copy
Error
Comments
if you don't spell the words correctly you will get a wrong answer.
Don't prompt the judge or it will be wrong
Thanks so much for commenting that, that is the reason why my code failed for some of my text cases
Ah i see
This comment is hidden due to too much negative feedback. Show it anyway.
then your programs not correct
If your program fails test cases that over 700 users have solved, then odds are your program is not correct.
The sum of the the angles of a triangle is exactly 180 degrees.
This comment is hidden due to too much negative feedback. Show it anyway.