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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started