摘要:
1 // 编写西游记人物类(XiYouJiRenWu)其中属性有: 2 // 身高(height),名字(name),武器(weapon) 3 // 方法有:显示名字(printName),显示武器(printWeapon) 4 String Name; 5 int Height; 6 String
阅读全文
posted @ 2016-05-16 23:18
曦~妍
阅读(181)
推荐(0)
编辑
摘要:
1 Scanner sc=new Scanner(System.in); 2 int[] arr=new int[3]; 3 for(int i=0;iarr[i]) 13 { 14 int zhong=arr[i]; 15 arr[i]=arr[j]; 16...
阅读全文
posted @ 2016-05-16 23:08
曦~妍
阅读(992)
推荐(0)
编辑
摘要:
1 //有1、2、3、4四个数字,能组成多少个互不相同且无重复数字的三位数?都是多少 2 int count=0; 3 int a,b,c=0; 4 for(int i=0;i<4;i++) 5 { 6 for(int j=0;j<4;j++) 7 { 8 ...
阅读全文
posted @ 2016-05-16 10:54
曦~妍
阅读(573)
推荐(0)
编辑
摘要:
1 double height = 100;// 高度100米 2 double fantan = height / 2; //第反弹反弹高度 3 int i = 0; 4 for (i = 2;i<= 10;i ++){ 5 height = height + fantan * 2; //第i落经少米 6 ...
阅读全文
posted @ 2016-05-16 10:49
曦~妍
阅读(235)
推荐(0)
编辑
摘要:
1 //利用条件运算符的嵌套来完成此题:学习成绩> =90分的同学用A表示, 2 //60-89分之间的用B表示,60分以下的用C表示。 3 Scanner sc=new Scanner(System.in); 4 System.out.println("请输入一个数:"); 5 double chengji=sc.nex...
阅读全文
posted @ 2016-05-16 10:45
曦~妍
阅读(163)
推荐(0)
编辑