⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maopo.java~7~

📁 银行管理系统,根据实习的要求以及参考现实中的银行数据库系统
💻 JAVA~7~
字号:
package bank;
import java.util.Scanner;

class ord{
       private int[] num;
       public ord()
       {
               System.out.println("请输入待排序数组长度:");
               Scanner n=new Scanner(System.in);

               int x=n.nextInt();
           num=new int[x];
           for(int i=0;i<x;i++)
           {


               num[i] = n.nextInt();



           }


       }
       public void order()
       {
               int temp;
               boolean tag;
               tag=true;


               while(tag==true)
               {
                       tag=false;
                       for(int i=0;i<num.length-i;i++)
                       {
                               if(num[i]>num[i+1])
                               {
                                       temp=num[i+1];
                                       num[i+1]=num[i];
                                       num[i]=temp;
                                       tag=true;
                               }
                       }
               }
       }
       public void disp()
       {
               for(int i=0;i<num.length;i++)
               System.out.print(num[i]);
               System.out.print(' ');
       }
}
public class maopo  {
       public static void main(String[] args)

       {
               ord d=new ord();
               d.order();
               d.disp();
       }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -