Computer Science, asked by manuelalias753, 7 months ago

Write a program in Java to accept three sides of triangle as parameter and check whether it can form triangle or not. If it forms a triangle check whether it is a acute angled, obtuse angled or right angled triangle

Answers

Answered by BrainlyProgrammer
13

Answer:

Scanner Sc=new Scanner (System.in);

int a,b,c;

a=Sc.nextInt();

b=Sc.nextInt();

c=Sc.nextInt();

if((a+b+c)==180)

{

System.out.println("Triangle possible");

if (a==90)

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

else if ((a<90)&&(a>0))

System.out.println("Acute angle");

else if (a>90)&&(a<180)

System.out.println("Obtuse angled");

}

else

System.out.println("not possible");

Similar questions