Question: 1 (continued) c. (20 points) Complete this program, which reads the dimensions of a right triangle with leg a, leg b and the hypotenuse

1 (continued) c. (20 points) Complete this program, which reads the dimensions of a right triangle with leg a, leg b and the hypotenuse c, reprint the dimensions, and calculate and print the area and perimeter. We assume you can determine how to calculate the area and perimeter, either from memory or from carefully examining the test cases. 16/10 20 b a The formatting of your output should exactly match the formatting of the two test cases below, in which user input is underlined: Enter a, b, c: 6 8 10 Leg a: 6.0 Enter a, b, c: 3 4 5 Leg a: 3.0 Leg b: 4.0 Hypotenuse c: 5.0 Area: 6.00 Perimeter: 12.00 Leg b: 8.0 Hypotenuse c: 10.0 Area: 24.00 Perimeter: 24.00 int main() { double a, b, c; // Prompt for and read dimensions printf("Enter a, b, c: ");
Step by Step Solution
There are 3 Steps involved in it
Here is the completed program c include stdio h include cmath int main double a ... View full answer
Get step-by-step solutions from verified subject matter experts
