Question: 5. Write a C++ program that will calculate the perimeter and area of a right triangle. You must use three functions: (i) Function calculate

5. Write a C++ program that will calculate the perimeter and area of a right triangle. You must use three functions: (i) Function calculate Perimeter to calculate the perimeter of the triangle and returns the perimeter value. (ii) Function calculate Area that will calculate the area of the triangle and returns the area value. (iii) Function displayResult that will display the perimeter and area values on the screen. Your main program will ask the user to provide the length of two sides (x and y) of the right triangle. Use cmath library function to assist you. Given below are the formulas: z = x + y 1 Z area xxx y X 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
