min) {= angle; = i;
} (angle> max) {= angle; = i;
} ("Triangle n", fPtr);
(* triangles [i]). retValues ​​(val [0], val [1], val [2], val [3], val [4], val [5]); ( val [0], temp0, 10); (val [1], temp1, 10); (val [2], temp2, 10); (val [3], temp3, 10); (val [4], temp4 , 10); (val [5], temp5, 10); (fPtr, "Tri1: x =% s; y =% s nTri2: x =% s; y =% s nTri3: x =% s ; y =% s n ",, temp1, temp2, temp3, temp4, temp5);
} (fPtr); (max> = 0.0)
(* triangles [maxAngle]). setColor (12); (min <900.0)
(* triangles [minAngle]). setColor (10);
} Executer :: drawAll (Triangle * triangles [])
{i = 0; (triangles [i]! = 0)
(* triangles [i + +]). draw ();. get (); ();
} Executer :: areTheyCrossing (Triangle * triangles [], int minAngle, int maxAngle)
{(triangles [0] == 0) <<"ТРИКУТНИК вiдсутнi." <
}. h:
# ifndef TRIANGLE_H
# define TRIANGLE_H
# include "line.h"
# define YES 1
# define NO 0Triangle: public Line {: (int a1, int b1, int a2, int b2, int a3, int b3); isObtuse () const; draw (); operator + (Triangle & right) const; retValues ​​(int & a1, int & b1, int & a2, int & b2, int & a3, int & b3) {= x1; b1 = y1; = x2; b2 = y2; = x3; b3 = y3;
}: x3, y3; isCrossing (long x1, long y1, long x2, long y2, long a1, long b1, long a2, long b2) const;
};
# endif
# include "triangle.h"
# include
# include
# include
# include
# include
# define MAX3 (a, b, c) (a> b? (a> c? a: c): (b> c? b: c))
# define MAX (a, b) (a> b? a: b)
# define MIN (a, b) (a
# define LENGTH (x1, y1, x2, y2) sqrt ((double) ((double) ((double) x1-x2) * (x1-x2) + (double) ((double ) y1-y2) * (y1-y2))) :: Triangle (int a1, int b1, int a2, int b2, int a3, int b3): Line (a1, b1, a2, b2)
{= 15; = (a3> = 0? a3: 0); = (b3> = 0? b3: 0);
} Triangle :: isObtuse () const
{a = 0, b = 0, c = 0, max ...