Multiple choice

Which of the following statements in C is the correct one to find whether a triangle is an equilateral triangle or not? Let the sides of the triangle be A, B, & C.

  1. if(A==B || B==C || A==C)

  2. if(A!=C || A!=B)

  3. if(A==B==C)

  4. if(A!=B && A!=C)

  5. if(!A==B || !A==C)

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

When all the three sides of a triangle are equal then it is called equilateral triangle. This is true in this statement.