Computer Science, asked by kristen829, 1 year ago

Wap to input the sides of a triangle . Pass the sides to a function decide(int x,int y,int z) which checks and prints whether the triangles is equilateral,isosceles or scalene .

Answers

Answered by zyrakhan2
1
class Demo
{
public static void main(int x,int y,int z)
{
if(x=y && x=z)
System.out.println('the triangle is equilateral');
else if(x=y || x=z)
System.out.println("the triangle is isosceles");
else if (x!=y && x!=z);
System.out.println ("the scalene triangle ");
}
}

Similar questions