摘要:
注:选择排序就是从第一个数开始依次遍历,找出最小的数,然后交换位置,直到剩余元素只有一个为止。 代码如下: public class MaoPao { public static void main(String[] args){ //直接选择排序 int[] arr = new int[]{49, 阅读全文
posted @ 2016-07-27 20:37
caocx
阅读(210)
评论(0)
推荐(0)
摘要:
public class MaoPao { public static void main(String[] args){ int[] arr = new int[]{49,38,65,76,13,27,49}; //i代表的是查询的轮数 for(int i=0;i<arr.length;i++){ 阅读全文
posted @ 2016-07-27 18:00
caocx
阅读(198)
评论(0)
推荐(0)
摘要:
代码如下: public class ErArray { public static void main(String[] args) { //杨辉三角 int[][] num = new int[10][]; //初始化动态数组 for(int i=0;i<num.length;i++){ //这 阅读全文
posted @ 2016-07-27 15:10
caocx
阅读(291)
评论(0)
推荐(0)
摘要:
import java.util.Scanner;public class TestStudent { public static void main(String[] args) { //从键盘获得数据 Scanner scan = new Scanner(System.in); //输入学生个数 阅读全文
posted @ 2016-07-27 11:19
caocx
阅读(2032)
评论(0)
推荐(0)

浙公网安备 33010602011771号