Question: Define a structure called Point which will represent an x,y coordinate. Point should have 2 members, x and y, stored as doubles. Request x,y coordinates
Define a structure called Point which will represent an x,y coordinate. Point should have 2 members, x and y, stored as doubles.
Request x,y coordinates from the user. The program should collect x,y points until the user enters "q" or "Q". The user should be allowed to store as many points as they would like.
Write a function that computes the largest triangle that can be created from the list of points passed to the function. Create a triangle structure that contains three pointers to Point structs and return that structure from the function.
note: I have the first and the second part, i need help with the function part. I used vector to collect my data from user.
FIRST PART:
#include
using namespace std;
struct point { double x; double y; };
int main() { vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
