摘要: /* 4、随机生成一个100以内的整数,猜数字游戏 从键盘输入数,如果大了提示,大了,如果小了,提示小了,如果对了,就不再猜了, 并统计一共猜了多少次 */ class Test09_Exer4{ public static void main(String[] args){ //随机生成一个100 阅读全文
posted @ 2020-07-24 20:14 窦云鹏 阅读(336) 评论(0) 推荐(0) 编辑
摘要: /* 6、从1循环到150并在每行打印一个值, 另外在每个3的倍数行上打印出“foo”,在每个5的倍数行上打印“biz”, 在每个7的倍数行上打印输出“baz”。 */ class Test07_Exer6{ public static void main(String[] args){ //从1循 阅读全文
posted @ 2020-07-24 17:30 窦云鹏 阅读(233) 评论(0) 推荐(0) 编辑
摘要: /* 5、输出所有的水仙花数, 所谓水仙花数是指一个3位数,其各个位上数字立方和等于其本身。 例如: 153 = 1*1*1 + 5*5*5 + 3*3*3 */ class Test06_Exer5_2{ public static void main(String[] args){ System 阅读全文
posted @ 2020-07-24 17:09 窦云鹏 阅读(327) 评论(0) 推荐(0) 编辑