Write a program to input the length of three sides of a triangle and print appropriate message for the type it belongs scalene equatorial aur isosceles
Answers
Answer:
hello
Explanation:
import java.util.*;
class tri
{
public static void main()
{
Scanner s = new Scanner(System.in);
System.out.println("Enter three sides of triangle");
int a = s.nextInt();
int b = s.nextInt();
int c = s.nextInt();
triangle_type(a,b,c);
}
static void triangle_type(int x,int y,int z)
{
if(x==y&&y==z)
System.out.println("Triangle is equilateral");
else if(x==y||y==z||z==x)
System.out.println("Triangle in isosceles");
else
System.out.println("Triangle is scalene");
}
}
please make me brainliest