Question: Assignment Details CIS - 2 5 2 - JA - Intro to Data Struct.: C + + - CRN 9 8 3 0 0 Using

Assignment Details
CIS-252-JA-Intro to Data Struct.: C++-CRN 98300
Using the editor or IDE of your choice, create a source code file with a .cpp extension.
Add a comment with your name at the top of your program. Include any libraries you need to use.
In the main function, prompt a user for the to enter the lengths for three sides of a triangle.
Using the lengths passed by the user, calculate if the triangle is a right triangle and display that information. You should use the pythagorean theorem for this. Note that if you need to take a square root you can use the C++?? sqrt() function.
You must use proper indentation and naming of variables. (One indent should be a tab or at LEAST 4 spaces.)
Create a screenshot showing a test run of your program.
Note: You can complete this all in the main function or you can make a helper function for the right triangle calculation.
Example program run:
Enter the length for side 1:
12
Enter the length for side 2:
13
Enter the length for side 3:
8
A triangle with sides of 12,13, and 8 is not a right triangle.
Another example program run:
Enter the length for side 1:
5
Enter the length for side 2:
13
Enter the length for side 3:
12
A triangle with sides of 5,13, and 12 is a right triangle
Assignment Details CIS - 2 5 2 - JA - Intro to

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 Programming Questions!