Question
Rasika had an assignment from her mathematics class to identify the type of a triangle using the length of its side. Using your Java coding
Rasika had an assignment from her mathematics class to identify the type of a triangle using the length of its side. Using your Java coding skills, help her to identify and display the triangle name.
If all the three sides of the triangle are different then it is a"
If any two sides of the triangle are equal then it is an"
If all the three sides of the triangle are equal then it is an"
Note:
The length of any side must be greater than 0, otherwise, print "
Sample Input 1:
5
5
5
Sample Output 1:
5, 5, 5 are the sides of Equilateral Triangle
Sample Input 2:
5
0
Sample Output 2:
0 is an Invalid Length
Sample Input 3:
10
15
10
Sample Output 3:
10, 15, 10 are the sides of Isosceles Triangle
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started