cout <<"POISK PO KONKURSU and NAME "<<endl<<endl;
cout <<"Input of KONKURS:";
cin >> inp2;
d=atof(inp2);
cout <<"Input of NAME:";
cin >> inp2;
cout <<endl;
val=line_find_to_COMPETITION_and_NAME_all(begin,d,inp2);
cout << endl<<"Find of "<<val<<" elements"<<endl;
wait_key();
break;
case 2: clrscr();
cout <<"POISK PO OPLATE and NAME "<<endl<<endl;
cout <<"Input of OPLATY:";
cin >> inp2;
val=atoi(inp2);
cout <<"Input of NAME:";
cin >> inp2;
cout <<endl;
val=line_find_to_SIZE_PAY_and_NAME_all(begin,val,inp2);
cout << endl<<"Find of "<<val<<" elements"<<endl;
wait_key();
break;
}
}while(inp1!=3);
delete []inp2;
}
//glavnoe menu
void general_menu (educational* &begin, educational* &end)
{
int inp1;
char *inp2=new char [25];
do {
clrscr();
cout << "Timofeeva V.S.. ATP - 10" << endl;
cout << "Kursovaya rabota - Variant 13" << endl;
cout << "General menu (in list to "<<count_to_list(begin)<<" elements):"<<endl;
cout << " 1 - NEW LIST" << endl;
cout << " 2 - DELETE LIST" << endl;
cout << " 3 - OPEN LIST FROM FILE" << endl;
cout << " 4 - ADD LIST FROM FILE" << endl;
cout << " 5 - SAVE LIST TO FILE" << endl;
cout << " 6 - ADD ELEMENT TO LIST" << endl;
cout << " 7 - DELETE ELEMENTS OF LIST" << endl;
cout << " 8 - FIND ELEMENTS OF LIST" << endl;
cout << " 9 - ORDERING LIST" << endl;
cout << "10 - LICHNOE ZADANIE" << endl;
cout << "11 - OUT LIST TO DISPLAY" << endl;
cout << "12 - EXIT FROM PROGRAMM" << endl;
cout <<"Input:";
cin >> inp2;
inp1=atoi(inp2);
switch (inp1)
{ case 1: clrscr();
new_list(end,begin); break;
case 2: delete_all(end,begin); break;
case 3: cout <<"Input File: ";
cin >> inp2;
open_new_list (end,begin,inp2);
break;
case 4: cout <<"Input File: ";
cin >> inp2;
open_add_list (end,begin,inp2);
break;
case 5: cout <<"Input File: ";
cin >> inp2;
save_list (begin,inp2);
break;
case 6: cout <<"Input data of "<<count_to_list(begin)+1<<" element:"<<endl;
if (!input_new(end)) { cout << "memory not enough!"<<endl;
wait_key();
}
else if (!begin) begin=end;
break;
case 7: menu_of_delete(begin,end);
break;
case 8: menu_of_find(begin,end);
break;
case 9: menu_of_orending(begin,end);
break;
case 10: clrscr();
menu_of_LICHNOE_ZADANIE(begin,end);
break;
case 11: clrscr();
out_of_display(begin);
break;
}
}while(inp1!=12);
delete []inp2;
}
main()
{
educational *begin=NULL;
educational *end=NULL;
general_menu(begin, end);
}
4.Описание работы программы
Для начала работы нужно запустить файл программы “Program.exe”. На экране отобразится окно программы с главным меню:
Рисунок 4.1
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.