election, number = 0; inp rez; ZNAK * BOOK = 0; (1)
{= menu (); (selection)
{1: = input (number, BOOK); = rez.number; = rez.BOOK;; 2: (BOOK, number);; 3: (BOOK, number);
break; 4: ("Ви дійсно хочете вийти 1-так, 2-ні (1/2)?"); c = getch (); ((c! = '1 ' ) && (c! = '2 ')); (c == '1')
{
_setvideomode (_DEFAULTMODE); (BOOK); (0);
}
}
}
} menu ()
_setvideomode (_VRES16COLOR);
_setbkcolor (_WHITE);
_clearscreen (_GCLEARSCREEN); (c! = 13)
{(c == 72) (selection == 1) = 4; selection -; (c == 80) (selection == 4) = 1; selection + +;
_setcolor (buttonnotselected); (i = 0; i <4; i + +)
{(i +1 == selection)
_setcolor (buttonselected);
_rectangle (_GFILLINTERIOR, x [0], y [i], x [1], y [i] + h);
_rectangle (_GBORDER, x [0] -9, y [i] -9, x [1] +9, y [i] + h +9); (i +1 == selection )
_setcolor (buttonnotselected);
}
_settextcolor (textnotselected);
_settextposition (5,32); (selection == 1)
_settextcolor (textselected);
_outtext ("Створити нові записи"); (selection == 1)
_settextcolor (textnotselected);
_settextposition (11,33); (selection == 2)
_settextcolor (textselected);
_outtext ("Вивести на прізвище"); (selection == 2)
_settextcolor (textnotselected);
_settextposition (18,35); (selection == 3)
_settextcolor (textselected);
_outtext ("Вивести все"); (selection == 3)
_settextcolor (textnotselected);
_settextposition (24,39); (selection == 4)
_settextcolor (textselected);
_outtext ("Вихід"); (selection == 4)
_settextcolor (textnotselected); = getch ();
}
_setvideomode (_TEXTC80);
_settextcolor (14);
_clearscreen (_GCLEARSCREEN); selection;
} inp input (int number, struct ZNAK * BOOK)
{inp rez; i, j, errorflag, errorflag2, breaker; c, flag = 1, comparer [128]; = 0;
if (number)
{("Записи вже существуют.Еслі ви хочете ... n"); ("... видалити старі записи і створити нові '1 ' n"); (" ... додати записи до існуючих '2 ' ...