//主函数
public static void main(String[] args)
{
int arr[];
arr =shuru();
System.out.println("输入的数组为:");
show(arr);
Scanner input = new Scanner(System.in);
int num_function;
w:while(true)
{
System.out.println(" ");
System.out.println("---------------------------------------------------------------");
System.out.println("1.查看数组\t 2.排序数组\t 3.查找元素\t");
System.out.println("4.增加元素\t 5.删除元素\t 6.退出程序\t");
System.out.println("---------------------------------------------------------------");
System.out.print("请输入功能号码:");
num_function = input.nextInt();
switch(num_function)
{
case 1:
System.out.println("数组为:");
show(arr);
break;
case 2:
System.out.println("排序后的数组为:");
maopaopaixu(arr);
show(arr);
break;
case 3:findnum(arr);break;
case 4:addnum(arr);break;
case 5:delnum(arr);break;
case 6:System.out.println("程序结束");break w;
default:System.out.println("输入错误!");break w;
}
}