Respuesta :

Answer:

Here is the code in c++.

//include headers

#include <bits/stdc++.h>

using namespace std;

//main function

int main() {

//variables to store coordinates

float x1,x2,y1,y2,x3,y3;

cout<<"Please Enter the coordinate of first point (x1,y1): ";

// reading coordinate of first point

cin>>x1>>y1;

cout<<"Please Enter the coordinate of second point (x2,y2): ";

// reading coordinate of second point

cin>>x2>>y2;

cout<<"Please Enter the coordinate of third point (x3,y3): ";

// reading coordinate of third point

cin>>x3>>y3;

//calculating area of the triangle

float area=abs((x1*(y2-y3)+x2*(y3-y1)+x3*(y1-y2))/2);

cout<<"area of the triangle:"<<area<<endl;

return 0;

}

Explanation:

Declare four variables x1,x2,x3,y1,y2,y3 to store the coordinate of all three

points of circle.Read the coordinate of all the point from user.Calculate area of triangle with the help of mentioned formula area=abs((x1*(y2-y3)+x2*(y3-y1)+x3*(y1-y2))/2). Then print the area of the triangle.

Output:

Please Enter the coordinate of first point (x1,y1): 11 17                                                                                                      

Please Enter the coordinate of second point (x2,y2): 23 30                                                                                                    

Please Enter the coordinate of third point (x3,y3): 43 18                                                                                                      

area of the triangle:202