Computer Science, asked by TVD, 3 months ago

write a program to input 3 sides of a triangle and tell wheather it's is a right angle triangle or not​

Answers

Answered by abdurehman556
0

Scanner in=new Scanner(System.in);

System.out.println ("enter the sides of a triangle");

int a=in.nextInt ();

Int b=in.nextInt ();

Int c=in.nextInt ();

if (a <b &&b <c)

{

D=a*a+b*b;

E=c*c;

if (D=E)

Sop ("it's a right angled triangle");

Else

Sop ("not angled right angled triangle");

}

Else if (a> b&&aa> c)

{

D=c*c+b*b;

E=aa*a;

if (D=E)

Sop ("it's a right angled triangle");

Else

Sop ("not angled right angled triangle");

}

Else if (b> c&&b> a)

{

D=a*a+c*c;

E=b*b;

if (D=E)

Sop ("it's a right angled triangle");

Else

Sop ("not angled right angled triangle");

}

Else

Sop ("not a right angled triangle")

}

Similar questions