Basics_Que_15

Home / Java Practice Question / Basics_Que_15

Basics_Que_15


Write a program to check whether the triangle is equilateral, isosceles or scalene triangle.....


program : 

public class Loop {

public static String angleType(int side1 , int side2 ,int side3){

if(side1==side2 && side2==side3){
return "equilateral";
}else if(side1==side2 || side2==side3 || side1==side3){
return "isosceles";
}else{
return "scalene";
}
}

}