Question: C++ The functions can be declared as void getData (double& base, double& height); void computing (double base, double height, double& area, double& perimeter); void print

 C++ The functions can be declared as void getData (double& base,

C++

The functions can be declared as

void getData (double& base, double& height);

void computing (double base,

double height,

double& area,

double& perimeter);

void print (double area, double perimeter);

Write a program that uses functions to compute the perimeter and area of a right triangle when given the length of two sides a and b. b The following formulas may be helpful: C2 = a2 + b2 0.5 * a * b area Requirements A structure chart for this problem is given as follows: area Perimeter getData computing print Declare all the variables and parameters as double. Input Two side a and b of a right triangle. Output Area and perimeter of the right triangle. An Example of Test Run The output of your program might look like this: csci>a.out Enter the length of side a: 3.0 Enter the length of side b: 4.0 The perimeter is 12.0. The area is 6.0. Do you want to calculate another set of data? Y Enter the length of side a: 2.0 Enter the length of side b: 7.0 The perimeter is 16.8. The area is 7.0. Do you want to calculate another set of data? N Thank you

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