Шпаргалка: Реализация списка

cout<<" 8. Find Element." <<endl;

cout<<" 9. Sort List." <<endl;

cout<<" 0. Exit." <<endl;

cout<<endl<<"Your choice : ";

int i;

do

{cin>>i;

if (i<0 || i>9) cout<<endl<<"Error! Try again : ";

}

while (i<0 || i>9);

return i;

}

int TreeWork::SubMenu()

{cout<<endl<<"Sub Menu:"<<endl;

cout<<"1. Sort list by increase."<<endl;

cout<<"2. Sort list by decrease."<<endl<<endl;

int i;

cout<<"Your choice: ";

do

{cin>>i;

if (i<1 || i>2) cout<<endl<<"Error! Try again : ";

}

while (i<1 || i>2);

return i;

}

int TreeWork::SubWork(int Task)

{switch (Task)

{case 1 : SortByIncrease(); break; //Increase

case 2 : SortByDecrease(); break; //Decrease

К-во Просмотров: 1752
Бесплатно скачать Шпаргалка: Реализация списка