#include<iostream>
using namespace std;
template<class T>
void Swap(T& a,T& b);
template<class T>
bool Bubble(T a[], int n);
template<class T>
void Bubblesort(T a[],int n);
template<class T>
void InsertionSort(T a[],int n);
template<class T>
void Output(T a[],int n);
template<class T>
void RadixSort(T a[],int n);
template<class T>
int maxbit(T a[],int n);
void main(){
int shuzu[10];
int i;
int num=0;
cout<<"Input"<<endl;
cin>>i;
while(i!=0&&num<10){
shuzu[num] = i;
cin>>i;
num++;
}
cout<<"1-冒泡排列,2-插入排列,3-基数排列"<<endl;
int j;
cin>>j;
switch(j){
case 1:
cout<<"冒泡排列";
Bubblesort(shuzu,num);
break;
case 2:
cout<<"插入排列";
InsertionSort(shuzu,num);
break;
case 3:
cout<<"基数排序";
RadixSort(shuzu,num);
break;
default:
break;
}
cout<<endl;
cout<<"Output"<<endl;
Output(shuzu,num);
cout<<"End"<<endl;
}
template<class T>
void Swap(T& a,T& b){
T temp=a;
a=b;
b=temp;