#  (Programming: 8 points) A triangle with sides of length
#   A, B, and C, where C is the longest side, is a right triangle if
#         A**2 + B**2 = C**2
# Write code you could put into file isRightTriangle.py to accept
# from the user 3 floats A, B, and C.  First check that C is the largest
# of the three; print an error message if not and stop.  If C is
# largest, check if the triangle is a right triangle.  Since the sides
# are floats and float arithmetic is approximate, check that
#       -0.0000001 < (A**2 + B**2 - C**2) < 0.0000001$
# Report the results.  You can assume any modules you need have been
# imported. Follow the samples below:
# 
# > python isRightTriangle.py     > python isRightTriangle.py
# Enter A: 3.0                    Enter A: 4.0
# Enter B: 5.0                    Enter B: 4.0
# Enter C: 4.0                    Enter C: 5.0
# C must be largest side          Not right triangle
# > python isRightTriangle.py     > python isRightTriangle.py
# Enter A: 3                      Enter A: 1.0
# Enter B: 4                      Enter B: 1.0
# Enter C: 5                      Enter C: 1.4142135623730951 # sqrt(2)
# Right triangle                  Right triangle

A = float( input( "Enter A: " ))
B = float( input( "Enter B: " ))
C = float( input( "Enter C: " ))
if not (C > A and C > B):
    print("C must be largest side")
elif (-0.0000001 < (A**2 + B**2 - C**2) < 0.0000001):
    print("Right triangle")
else:
    print("Not right triangle")

