摘要:
1.定义一个长度为10的int数组,统计数组中的最大值、最小值、以及奇数和偶数的个数 /* 定义一个长度为10的int数组,统计数组中的最大值、最小值、以及奇数和偶数的个数 */ public class Test01 { public static void main(String[] args) 阅读全文
摘要:
/*比如:计算1~5的和 1+2+3+4+5*/ /*比如:计算1~5的和 1+2+3+4+5 */ public static void main(String[] args) { int n = 4; int revalue = sum(n); int add; System.out.print 阅读全文
摘要:
数字具体的和 public static void main(String[] args) { while (true) { System.out.println("请输入一个数字"); Scanner sc = new Scanner(System.in); long b = sc.nextLon 阅读全文
摘要:
### 二、编程题 1.已知2019年是猪年,请在控制台输出从1949年到2019年中所有是猪年的年份。 //已知2019年是猪年,请在控制台输出从1949年到2019年中所有是猪年的年份。 int count = 0; int i; for (i = 1949; i <= 2019; i += 4 阅读全文