摘要: 1 import java.text.*; 2 public class Text_10 { 3 4 public static void main(String[] args) { 5 /* 6 * 一个球从100米高度自由落下,每次落地后反弹回原高度的一半; 7 * 再落下,求它在第10次落地时 阅读全文
posted @ 2020-03-09 19:25 Hey蜗牛 阅读(2702) 评论(0) 推荐(0)
摘要: 1 public class Text_9 { 2 public static void main(String[] args) { 3 /*一个数如果恰好等于它的因子之和,这个数就称为"完数".如:6=1+2+3,编程找出1000以内的所有完数。 4 */ 5 for(int i=1;i<1000 阅读全文
posted @ 2020-03-09 19:16 Hey蜗牛 阅读(393) 评论(0) 推荐(0)
摘要: 1 import java.util.*; 2 public class Text_8 { 3 4 public static void main(String[] args) { 5 /* 6 * 求s=a+aa+aaa+aaaa+....的值,其中a是一个数字。 7 * 例如:2+22+222+ 阅读全文
posted @ 2020-03-09 19:12 Hey蜗牛 阅读(643) 评论(0) 推荐(0)
摘要: 代码一: 1 import java.util.*; 2 public class Text_7 { 3 4 public static void main(String[] args) { 5 /* 6 *输入一行字符,分别统计出其中英语字母,空格,数字和其他字符的个数 7 */ 8 Scanne 阅读全文
posted @ 2020-03-09 19:11 Hey蜗牛 阅读(789) 评论(0) 推荐(0)
摘要: 1 package FushiExam; 2 import java.util.*; 3 public class Text_6 { 4 5 public static void main(String[] args) { 6 /* 7 * 输入两个正整数m和n,求其最大公约数和最小公倍数 8 */ 阅读全文
posted @ 2020-03-09 19:05 Hey蜗牛 阅读(314) 评论(0) 推荐(0)