Реферат: Сортировка массивов методом вставок
////////////////////Save List/////////////////////
void SaveList(){
if (n==0) cout<<endl<<"List is empty."<<endl;
else{
for (int i=0; i<n; i++){
if (i%10==0) f<<endl;
f<<setw(3)<<*MasP[i];}
f<<endl;
}
}
///////////////////FindElement////////////////////
void FindElement(){
if (n==0) cout<<endl<<"List is empty."<<endl;
else{
cout<<endl<<"Input the value, which must be finded: ";
int a,s=0; cin>>a;
for (int i=0; i<n; i++){
if (*MasP[i]==a) {
cout<<endl<<(i+1)<<"-th element"<<" - "<<*MasP[i];
s=i;}}
if (s==0) cout<<endl<<"The existing list hasn't element with this value";
cout<<endl;
}
}
//////////////////SubWork(Sort)///////////////////
void SubMenu(){
if (n==0) cout<<endl<<"List is empty."<<endl;
else{
cout<<endl<<" Sub Menu:"<<endl;