摘要:
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蜗牛
阅读(392)
评论(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蜗牛
阅读(639)
评论(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)

浙公网安备 33010602011771号