**Question:**

Write a Java Program to accept three positive Integers as input and check whether the given numbers farm a right angle Triangle or not. If the input numbers form a triangle print “RightAngle Triangle” else “Not a right-angle Triangle”.

In case of zero or negative inputs print “Invalid”.

Note: Rule to form a right-angle triangle is, sum of square of any two numbers should be equal to the square of third number.

Sample input 1:

Enter three sides:

3

4

5

Sample output:

Right-Angle Triangle

Sample input 2:

Enter three sides:

32

0

5

Sample output 2:

Invalid

**Code:**

**Main.java**

import java.util.Scanner; public class right_angle_triangle { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter three sides:"); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a>0 && b>0 && c>0){ int a1 = a*a; int b1 = b*b; int c1 = c*c; if(c1== a1+b1 || b1==a1+c1 || a1==b1+c1){ System.out.println("Right-Angle Triangle"); } else { System.out.println("Not a right-angle Triangle"); } } else{ System.out.println("Invalid"); } } }

**Output:**

Enter three sides: 3 45 2 Not a right-angle Triangle

หวยเด็ดI don’t even understand how I finished up right here, however I believed this post

was once great. I do not understand who you are however certainly you are going to a

famous blogger for those who aren’t already.

Cheers!

หวยเด็ดHeya i am for the primary time here. I came across this board and I find It really helpful & it helped me

out much. I’m hoping to give something again and aid others

such as you aided me.

หวยThis is my first time pay a quick visit at here and i am truly impressed to

read everthing at single place.

หวยAt this moment I am ready to do my breakfast,

later than having my breakfast coming again to

read more news.

หวยNeat blog! Is your theme custom made or did you download

it from somewhere? A design like yours with a few simple tweeks

would really make my blog shine. Please let me know where you got your design. Thanks

หวยHello mates, how is everything, and what you want to say on the topic of this post, in my view its

in fact amazing for me.

หวยThank you, I’ve just been looking for info approximately

this subject for a long time and yours is the best I’ve came upon till now.

However, what concerning the conclusion? Are you certain concerning the supply?