摘要: //输入一串字符,对其逆序输出import java.util.Arrays;import java.util.Scanner;public class Reversed{ public static void main(String[] args){ Scanner in=new Scanner... 阅读全文
posted @ 2014-07-08 18:07 穿越地平线 阅读(652) 评论(0) 推荐(0) 编辑
摘要: import java.util.Arrays;import java.util.Scanner;public class Ascending{ public static void main(String[] args){ Scanner in=new Scanner(System.in); ... 阅读全文
posted @ 2014-07-08 17:51 穿越地平线 阅读(373) 评论(0) 推荐(0) 编辑
摘要: //从键盘输入5个学生的成绩,并求出最高分import java.util.Scanner;public class Max1 { public static void main(String[] args){ Scanner in=new Scanner(System.in); int[] a... 阅读全文
posted @ 2014-07-07 23:16 穿越地平线 阅读(1220) 评论(0) 推荐(0) 编辑
摘要: import java.util.Scanner;public class Value{ public static void main(String[] args){ Scanner in=new Scanner(System.in); System.out.println("请定义学生的人数... 阅读全文
posted @ 2014-07-07 22:59 穿越地平线 阅读(302) 评论(0) 推荐(0) 编辑
摘要: public class Multiplication {public static void main(String[] args){for(int i=1;i<=9;i++){for(int j=1;j<=i;j++){System.out.print(j+"*"+i+"="+j*i+"\t")... 阅读全文
posted @ 2014-07-06 07:41 穿越地平线 阅读(151) 评论(0) 推荐(0) 编辑
摘要: import java.util.Scanner;public class NegativeSequence{public static void main(String[] args){System.out.println("请输入一个整数");Scanner XX=new Scanner(Sys... 阅读全文
posted @ 2014-07-06 07:39 穿越地平线 阅读(1579) 评论(0) 推荐(0) 编辑
摘要: import java.util.*;public class GuessNumber{//猜数字游戏public static void main(String[] args){Scanner in=new Scanner(System.in);Random MyRandom=new Random... 阅读全文
posted @ 2014-07-06 07:37 穿越地平线 阅读(682) 评论(0) 推荐(0) 编辑
摘要: import java.util.*;public class Avg{//求平均值public static void main(String[] args){Scanner in=new Scanner(System.in);System.out.println("请输入学生的人数");int ... 阅读全文
posted @ 2014-07-06 07:34 穿越地平线 阅读(653) 评论(0) 推荐(0) 编辑
摘要: //1+2+3+4+......100=?public class Accumulate {//累加求和 public static void main(String[] args){int sum=0;int i=1;while(i<=100){sum=sum+i;i++;}System.out.... 阅读全文
posted @ 2014-07-06 07:33 穿越地平线 阅读(623) 评论(0) 推荐(0) 编辑
摘要: import java.util.*;public class Guess{//猜拳游戏 public static void main(String[] args){Scanner in=new Scanner(System.in);System.out.println("--------猜拳游戏... 阅读全文
posted @ 2014-07-05 23:56 穿越地平线 阅读(270) 评论(0) 推荐(0) 编辑