Question: Write a java program that asks the user for three strictly positive real numbers a, b, and c. a) Test if these integers can

   Write a java program that asks the user for three strictly positive real numbers a, b, and c. a) Test if 

Write a java program that asks the user for three strictly positive real numbers a, b, and c. a) Test if these integers can form a triangle, this is only possible if the sum of any of two values is bigger than the third. Otherwise display that no triangle is possible. b) In case the triangle exists, calculate and display its semi perimeter given by the following equation: sp-(a+b+c)/2. c) Calculate and display the area of the triangle given by the following equation: area=sp (sp-a)*(sp-b)*(sp-c) d) Verify if the triangle is a right triangle, this is only possible if the square of one of the values is equal to the sum of squares of the other two.

Step by Step Solution

3.37 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The image displays a question that outlines the requirements for a Java program Here is a stepbystep solution using pseudocode and Java code that fulf... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!