Right Triangle Progam using x AND y

I originally had the user input three different lengths and then used this to determine whether or not it was a right triangle.if(c==sqrt(a*a+b*b)||a==sqrt(b*b+c*c)||b=sqrt(a*a+b*b))
now it has to be modified in order to accept the input 2,2 4,4 and 6,8(only an example) and be able to find out if it is a right triangle. I was told that arrays were not necessarily the only way to go about it. Any suggestions?
Last edited on
You could calculate each angle between your 2 line segments and see if one matches 90 degrees.
Topic archived. No new replies allowed.