Question: Please name the project: programming exercise 2 - Write a program that asks the user for the lengths of 3 sides of a triangle and
Please name the project: programming exercise 2
- Write a program that asks the user for the lengths of 3 sides of a triangle and prints whether or not these sides make a valid triangle
- The rule to use is the "Triangle Inequality Theorem"
- The program must prompt and ask the user for the length of each side. Read each number as a double data type.
- Code the logic of the theorem such that if the lengths given by the user make a valid triangle, the program prints "These sides make a valid triangle".
- If the given lengths do not make a valid triangle, print "These sides do not make a valid triangle".
Please write this in java programming language and please explain in each step what we are doing.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
