#include<stdio.h>
#include<string.h>
#include<math.h>
void Judege_trangle(double arr[3][2])
{
double area = 0.0;
double per = 0.0;
double a = sqrt(pow(arr[0][0] - arr[1][0], 2.0) + pow(arr[0][1] - arr[1][1], 2.0));
double b = sqrt(pow(arr[1][0] - arr[2][0], 2.0) + pow(arr[1][1] - arr[2][1], 2.0));
double c = sqrt(pow(arr[0][0] - arr[2][0], 2.0) + pow(arr[0][1] - arr[2][1], 2.0));
if (a + b > c&& a + c > b&& b + c > a && (unsigned)(a - b) < (unsigned)c && (unsigned)(a - c) < (unsigned)b && (unsigned)(b - c) < (unsigned)a)
{
printf(“Yes boy,It’s trangle\n”);
per = (a + b + c) / 2.0;
area = sqrt(per * (per - a) * (per - b) * (per - c));
printf(“area==%f per==%f\n”, 2*per,area);
}
else {
printf("It's not trangle");
}
}
int main()
{
double arr[3][2] = { 0 };
for (int i = 0;i < 3;i++)
{
for (int j = 0;j < 2;j++)
{
scanf_s("%lf", &arr[i][j]);
}
}
Judege_trangle(arr);
return 0;
}