Question: Write a c++ program that will prompt a user to enter a base and a height. You will use this base and height as inputs

Write a c++ program that will prompt a user to enter a base and a height. You will use this base and height as inputs to two functions.

Write a function called Triangle. Triangle will receive the base and height as inputs and will include two pointer variables as parameters that will return the area of the triangle and the perimeter of the triangle that has the entered based and height.

Write a second function called Rectangle. Rectangle will receive the same base and height as inputs and will include two pointer variables as parameters that will return the area of the rectangle and the perimeter of the rectangle that has the entered based and height.

You should output the area and perimeter of the triangle and the area and perimeter of the rectangle, all from main.

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!