Question: 1. Write a complete program to solve the following problem a) Prompt the user for the length of the 3 sides of a triangle in
1. Write a complete program to solve the following problem a) Prompt the user for the length of the 3 sides of a triangle in ascending order If a, b, and c represent the 3 sides of a triangle, the last value input will be c, the longest side. b) The following calculations can be made: 1. perimeter a+b+c 2. Set s = 0.5 * (a + b + c) 3The area of the triangle is the square root of s (s-a) (s-b) (s-c) 4.3. The triangle will be a right triangle, i.e. have a 90 degree angle, if (c squared the sum of a squared and b squared) is equal to 0 c) Output to the screen the 3 sides, the perimeter, the area, and if the triangle is a right triangle or not. You will need to use the sqrt function, so you will need to include cmath Run the program twice using the following data 04.0 5.0 5.0 6.07.0 2.Write the program described below Do NOT use a loop. Copy to your source code the output from executing your program 6 times. Select your input data to test all 6 cases. Problem 2 Description else if Using if
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
