Best Answer

import java.util.*;

public class triangle {

public static Scanner vic= new Scanner(System.in);

public static void main(String[]args){

System.out.println("Enter measurement of adjacent: ");

int adj = vic.nextInt();

System.out.println("Enter measurement of opposite: ");

int opp = vic.nextInt();

System.out.println("Enter measurement of hypoteneuse: ");

int hyp = vic.nextInt();

if(( adj < opp )&&(opp<hyp)){

System.out.println("Right triangle");

System.out.println("Regular triangle");

}

else if (( adj<opp )&&( opp > hyp)){

System.out.println("Isosceles triangle");

}

else if (( adj == opp)&&(adj==hyp)&&(hyp==opp)){

System.out.println("Equilateral triangle");

}

else{

System.out.println("Not a triangle");

}}

}

Q: Write a Java program to determine whether the triangle is equilateral triangle?

Write your answer...

Submit

Still have questions?

Continue Learning about Other Math

You look at the lengths of the sided of the triangle. If the two lengths are same, the triangle is an isosceles triangle. If all the lengths are same, the triangle is an equilateral triangle. If none of the lengths are same, the triangle is a scalene triangle.

The answer will depend on whether the length is the hypotenuse or one of the legs of the triangle.

sin, tan and cos can be defined as functions of an angle. But they are not functions of a triangle - whether it is a right angled triangle or not.

A regular polygon is a polygon which is equiangular (all angles are the same) and equilateral (all sides have the same length).

imaginary

Related questions

All triangles have exactly three sides. This is true whether the triangle is equilateral or not. If the triangle is equilateral, then the three sides will all be equal in length.All triangles have three sides.

None. Triangles - whether equilateral or not - do not have diagonals

We have no problem fitting an equilateral triangle into a square. It depends on the size of the triangle and the size of the square whether one can be fit inside the other.

It depends on what type of triangle it is.If it is equilateral then it will also be equiangular.If it is isosceles then it may be equiangular (it depends whether it is equilateral or not - an isosceles can be equilateral or it can just have two equal sides).Any other type of triangle will not be equiangular.

All triangles, whether equilateral or otherwise, have three angles.

You look at the lengths of the sided of the triangle. If the two lengths are same, the triangle is an isosceles triangle. If all the lengths are same, the triangle is an equilateral triangle. If none of the lengths are same, the triangle is a scalene triangle.

If its an isosceles triangle it has 1 line of symmetry but if its an equilateral triangle it has 3 lines of symmetry

This would depend on what programming language you wanted to write it in. For example, in Pascal, the code might look like this: Program Isosceles; Var A, B, C : Real; Begin WriteLn('Input side A.'); ReadLn(A); WriteLn('Input side B.'); ReadLn(B); WriteLn('Input side C.'); ReadLn(C); If A = B Then Begin If B = C Then Begin WriteLn('This triangle is equilateral.'); End Else Begin WriteLn('This triangle is isosceles.'); And so on.

Are you kidding me?! you are asking, how many angles are there in a three-sided polygon? Obviously three!! and since it is an equilateral all the angles would be same- 60 + 60 + 60 = 180 ( angle sum property of triangle)

the sum of the internal angles of a triangle, no matter whether isosceles, equilateral or scalene, is always 180 degrees

3 vertices in a triangle, whether it is equilateral, isosceles or scalene; acute angled, right or obtuse.

All triangles have three sides. Whether or not it is equilateral is irrelevant.