05 2017 档案
冒泡排序
摘要:import java.util.Arrays;import java.util.Random;public class BubbleSort { public static void main(String[] args){ //创建数组 int[] arr = new int[10]; Rand 阅读全文
posted @ 2017-05-31 15:43 两枝梅 阅读(89) 评论(0) 推荐(0)
求数组中的最大值并把它放到最后
摘要:import java.util.Arrays;import java.util.Random;public class MaxOfArray { public static void main(String[] args){ //创建一个10个长度的数组 int[] arr = new int[1 阅读全文
posted @ 2017-05-31 15:33 两枝梅 阅读(565) 评论(0) 推荐(0)
计算数组中的最大值
摘要:import java.util.Arrays;import java.util.Random;public class MaxOfArray { public static void main(String[] args){ //创建一个10个长度的数组 int[] arr = new int[1 阅读全文
posted @ 2017-05-31 15:29 两枝梅 阅读(454) 评论(0) 推荐(0)
九九乘法表
摘要:public class MultiplicationTable { public static void main(String[] args){ //i变量用于控制行数 for(int i=1;i<10;i++){ //j变量用于控制每行中参与计算的最大数值:与行数相等 for(int j=1; 阅读全文
posted @ 2017-05-31 15:23 两枝梅 阅读(141) 评论(0) 推荐(0)
随机加法运算器
摘要:import java.util.Scanner;public class AddCode { public static void main(String[] args){ System.out.println("即将开始10次加法测试。。。"); Scanner sc = new Scanner 阅读全文
posted @ 2017-05-31 15:15 两枝梅 阅读(290) 评论(0) 推荐(0)
猜数字游戏dowhile循环
摘要:import java.util.Scanner;public class NumberGuessV02 { public static void main(String[] args){ //生成一个随机数 int num = (int)(Math.random()*1000)+1; //准备输入 阅读全文
posted @ 2017-05-31 14:30 两枝梅 阅读(697) 评论(0) 推荐(0)
猜字母游戏
摘要:import java.util.Scanner;public class GuessingGame { public static void main(String[] args){ int count = 0; char[] input = null; int[] result = new in 阅读全文
posted @ 2017-05-31 14:22 两枝梅
java猜数字游戏while循环
摘要:import java.util.Scanner;public class NumberGuessV01 { public static void main(String[] ages){ //生成随机数 int num = (int)(Math.random()*1000)+1; System.o 阅读全文
posted @ 2017-05-31 14:20 两枝梅