ify"> h -;
setfillstyle (0,2);
bar (0, midy/2, midx/2 +60, midy * 2);
bar (0, midy/2, midx * 2, midy/2 +40);
bar (midx/25, midy +170, midx, midy +190);
}
if (h == 5) h = -1;
if (h == -2) h = 4;
if (p == 0) {
if (h == 0) h = 4;
if (h == 3) h = -1;
}
F (midx, midy, h, p);
if ((x == 13) && (h! = 4) && (h! = -1)) {int k = 0;
setfillstyle (0,2);
bar (0, midy/2 +20, midx/2 +60, midy * 2);
bar (0, midy/2, midx * 2, midy/2 +40);
bar (midx/25, midy +170, midx, midy +190);
while (x! = 8) {
if (x == 80) k + +;
if (x == 72) k -;
if (k == 2) k = 0;
if (k == -1) k = 1;
F2 (midx, midy, h, k);
x = getch ();
if (x == 13) {
int * kop = new int [razmer];
massiv (kop, razmer, metod);
moveto (midx/25, midy/2);
outtext ("Massiv sgenerirovan");
moveto (midx/25, midy/2 +20);
outtext ("i soxranen v");
moveto (midx/25, midy/2 +40);
outtext ("C :/ BORLANDC/BIN/2.BAK");
File1 (kop, razmer);
if (h == 0) {
na4alo (time1, r, s1);
puzir (kop, razmer, iter);
konec (time1, r, s1);
}
if (h == 1) {
na4alo (time1, r, s1);
vstavka (kop, razmer, iter);
konec (time1, r, s1);
}
if (h == 2) {
na4alo (time1, r, s1);
protalkivanie (kop, razmer, iter);
konec (time1, r, s1);
}
if (h == 3) {
na4alo (time1, r, s1);
Pirmidalina9 (kop, razmer, iter);
konec (time1, r, s1);
}
File (kop, k, razmer);
x = 8;
delete (kop);
moveto (midx/25, midy);
outtext ("Massiv otsortirovan");
if (h == 0) {
moveto (midx/25, midy +20);
outtext ("metodom puzirika!");
}