+ +)
{(int j = k +1; j
{+ +; [k]. gr = g; [j]. gr = g;;
} (int i = 0; i
{[j]. gr = g;
}
} (); (GREEN); (k = 1; k
{(int i = 0; i
} * SQR = new float [g+ 1]; * kilk = new int [g+ 1]; (i = 1; i <= g; i + +)
{[i] = 0; [i] = 0;
} (int j = 1; j <= g; j + +) (i = 0; i
{[j] = abs (SQR [j] + C [i]. S); [j] + +;
} (j = 1; j <= g; j + +) (kilk [j]! = 0) [j] = (float) SQR [j]/kilk [j]; (j = 1; j <= g; j + +) (i = 0; i
{= 10000; = 0; (i = 0; i
{(C [i]. gr == j)
{(C [i]. S
{= C [i]. S; = i;
}
}
} (RED); [n]. draw ();
} (); ();
} main ()
{(); 0;
}
Додаток Б
Програма-меню
# 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
}; main ()
{(0); (); mnu (10,1); (1). getmessage (getch ());
} Knopka: setparam (int xx1, int yy1, int xx2, int yy2, char * sstr)
{= xx1; = yy1; = xx2; = yy2; (str, sstr);
}; Knopka: show (int tcolor, int bcolor)
{(tcolor); (bcolor); (x1, y1, x2, y2); (); (1,1); (В«% sВ», str...