Given three sides of a triangle (a,b,c) as input. write a program to determine whether the triangle is Equilateral , Isosceles or Scalene?
INPUT:
The first line of input will contain an integer A
The second line of input will contain an integer B
The third line of input will contain an integer C
Output
If the given sides A,B & C are equal,print Equilateral
If the given sides any of two sides are equal, print Isosceles
If the given sides A,B,C are not equal to each other, print Scalene
Sample Input 1
4
4
4
Sample Output 1
Equilateral
Sample Input 2
3
2
3
Sample Output 2
Isosceles
A = int(input('Enter A: '))
B = int(input('Enter B: '))
C = int(input('Enter C: '))
if A == B and B == C:
print('Equilateral')
elif A != B and A != C and B != C:
print('Scalene')
else:
print('Isosceles')
Comments
Leave a comment