Question: Question: Today you are commissioned to create a Java program that will prompt for and read three integers as three internal angles of a triangle
Question: Today you are commissioned to create a Java program that will prompt for and read three integers as three internal angles of a triangle in degrees angle1, angle2 and angle3 entered by the user, and determine the category of the triangle based on the three angles according to the specifications that follow. Note that one set of user input may belong to more than one category. Be sure to use the same format and wording as in the sample runs in the tables below.
Using a series of compound if statements (no if/else or nested if required or needed) determine which condition(s) the 3 internal angles satisfy.
1. If any of the internal angles is equal to 90, display This might be a right triangle!.
2. If any of the internal angles is greater than 90, display This might be an obtuse triangle!.
3. If all the internal angles are smaller than 90, display This might be an acute triangle!.
4. If the sum of the three internal angles is not equal to 180, display This turns out to be an invalid triangle!.
5. Finish off with the message Finished!.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
