摘要: 模拟摇奖:从1-36中随机抽出8个不重复的数字 阅读全文
posted @ 2016-09-13 21:22 张好好 阅读(717) 评论(0) 推荐(0) 编辑
摘要: //冒泡排序 1 int [] a={1,7,9,3,6,0,2}; 2 int z; 3 for(int i=0;ia[j]) 8 { 9 z=a[i]; 10 a[i]=a[j]; 11 ... 阅读全文
posted @ 2016-09-13 18:00 张好好 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 输入年龄输出年龄段 阅读全文
posted @ 2016-09-13 15:22 张好好 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-09-13 08:59 张好好 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 水仙花数 int a; int b; int c; for (a=1;a<=9;a++) { for (b=0;b<=9;b++) { for(c=0;c<=9;c++) { if((a*100)+(b*10)+(c)==(a*a*a)+(b*b*b)+(c*c*c)) { System.out.p 阅读全文
posted @ 2016-09-13 08:52 张好好 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 百钱买百鸡 阅读全文
posted @ 2016-09-13 08:42 张好好 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 百马百担的问题 int a; int b; int c; for (a=0;a<34;a++) { for (b=0;b<=50;b++) { for(c=0;c<=200;c++) { if(3*a+2*b+c/2==100 && a+b+c==100) { System.out.println( 阅读全文
posted @ 2016-09-13 00:03 张好好 阅读(2391) 评论(2) 推荐(0) 编辑