Question: Help writing a c# program. Prompt the user for the length of three line segments as integers. If the three lines could form a triangle,

Help writing a c# program.

Prompt the user for the length of three line segments as integers. If the three lines could form a triangle, print the integers and a message indicating they form a triangle. Use a state-controlled loop to allow users to enter as many different combinations as they want.

HINT: Three sides can make a triangle if the sum of any two sides is greater than the third side. For instance, the sides {3, 4, 5} can make a triangle. However, the group {2, 3, 10} is not a valid triangle combination.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!