Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please create a basic function in C++ to compute the area of a triangle using only the corner points. Given the corner points of a

image text in transcribed

Please create a basic function in C++ to compute the area of a triangle using only the corner points.

Given the corner points of a triangle (x1,y1),(x2,y2),(x3,y3), write a function to compute the area. Hint: The area of the triangle with corner points (0,0),(x1,y1), and (x2,y2) is 2x1y2x2y1 To use this formula, you shift the given triangle so that one of its corners falls on the origin. This shift does not change the area. The corner points of the triangle shifted by (x,y) are (x1x,y1y),(x2x,y2y),(x3x,y3y)

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

More Books

Students also viewed these Databases questions