1.冒泡排序从小到大打印出(代码如下)
package f.java;public class LS { public static void main(String[] args) { // TODO Auto-generated method stub int[]i={10,20,30,14,15,26}; for(int a=0;ai[b]) { temp=i[a]; i[a]=i[b]; i[b]=temp; } } } for(int c=0;c
运行结果如下:
2.瑶瑶乐游戏
package f.java;import java.util.Random;public class LS { public static void main(String[] args) { // TODO Auto-generated method stub Random ran3=new Random(); int[] v= new int[8]; for(int q=0;q
运行结果: