>}
} = res; res;
}
}; struct storage
{* next; value;
}; main ()
{* f; ((f = fopen ("data.txt", "r")) == NULL)
{<<"Cannot open input data file. n"; (); (EXIT_SUCCESS);
} * str; x, y, count = 0; * first, * storage1; = new (storage); = new (storage); = first; (! feof (f)) p>
{(f, "% s", str); (f, "% 3c% d% s", str, & x, str); (f, "% 3c % d% s ", str, & y, str); -> value.init (x, y); -> next = new (storage); = storage1-> next; -> next = NULL ; + +;
} (f); gdriver = VGA, gmode = VGAHI; (& gdriver, & gmode, ""); * arrp; * arrt; * arrf, * arrft; = new CPoint [count +1]; = new CTriangle [int (count/3) +1]; = new int [count +1]; = new int [int (count/3) +1]; i; (i = 1 ; i <= count; i + +)
{[i] = first-> value; [i] = 1; = first-> next;
} g, k, countt = 0; tr; (i = 1; i <= count; i + +) (g = i; g <= count; g+ +) (k = g; k < = count; k + +) ((arrf [i]) && (arrf [g]) && (arrf [k]) && (i! = g) && (i! = k) && (g! = k))
{(tr.init (arrp [i], arrp [g], arrp [k])> 0)
{+ +; [countt] = tr; [i] = 0; [g] = 0; [k] = 0; [countt] = 1;
}
} (i = 1; i <= countt; i + +)
{(arrt [i]. gettype ())
{1: arrt [i]. draw (8);; 2: arrt [i]. draw (6);; 3: arrt [i]. draw (5);; p>
}
} max = arrt [1]; (i = 2; i <= countt; i + +) (arrt [i]. getper ()> max.getper ()) = arrt [i] ;. draw (1); (i = 1; i <= count; i + +) [i]. draw (14); (); ();
}
ДОДАТОК Б
Програма меню
# include
# include
# include
# include
# define LEFT 75
# define RIGHT 77
# define DOWN 13Knopka
{x1; y1; x2; y2; str [80];: setparam (int xx1, int yy1, int xx2, int yy2, char * sstr); show (int tcolor, int bcolor) ; void run (void) = 0;
}; knopka1: public Knopka
{: run (void);
}; knopka2: public Knopka
{: run (void);
}; knopka3: public Knopka
{: run (void);
}; knopka4: public Knopka
{: run (void);
}; knopka5: public Knopka
{: run (void);
}; Menu