Question: Assignment Details CIS - 2 5 2 - JA - Intro to Data Struct.: C + + - CRN 9 8 3 0 0 Using
Assignment Details
CISJAIntro to Data Struct.: CCRN
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 sqrt function.
You must use proper indentation and naming of variables. One indent should be a tab or at LEAST 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 :
Enter the length for side :
Enter the length for side :
A triangle with sides of and is not a right triangle.
Another example program run:
Enter the length for side :
Enter the length for side :
Enter the length for side :
A triangle with sides of and is a right triangle
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
