Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Xxiv Special Issue On Database And Expert Systems Applications Lncs 9510

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Hendrik Decker ,Lenka Lhotska ,Sebastian Link

1st Edition

366249213X, 978-3662492130

More Books

Students also viewed these Databases questions

Question

Identify the milestones in language development.

Answered: 1 week ago

Question

4. Describe cultural differences that influence perception

Answered: 1 week ago