摘要:
public static void main(String[] args) { for (int i = 0; i < 5; i++) { for (int i1 = 5; i1 >= i; i1--) { System.out.print(" "); }// System.out.println 阅读全文
posted @ 2021-02-15 22:16
街出
阅读(29)
评论(0)
推荐(0)
摘要:
public static void main(String[] args) { for (int i = 1; i <= 9; i++) { for (int j = 1; j <= i; j++) { System.out.print(j+"*"+i+"="+i*j+"\t"); } Syste 阅读全文
posted @ 2021-02-15 22:14
街出
阅读(10)
评论(0)
推荐(0)
摘要:
public static void main(String[] args) { System.out.println(f(5));}public static int f(int n){ if (n==1){ return 1; }else { return n*f(n-1); }} 阅读全文
posted @ 2021-02-15 22:12
街出
阅读(14)
评论(0)
推荐(0)
摘要:
public static void main(String[] args) { int[] arrays={1,2,3,4,5}; /*//遍历 for (int i = 0; i < arrays.length; i++) { System.out.println(arrays.length); 阅读全文
posted @ 2021-02-15 22:10
街出
阅读(33)
评论(0)
推荐(0)
摘要:
/*冒泡排序 1.比较数组中,两个相邻的元素,如果第一个数比第二个数大,我们就交换他们的位置 2.每一次比较,都会产生出一个最大,或者最小的数字 3,下一轮则可以少一次排序! 4.依次循环,直到结束!*/public static void main(String[] args) { int[] a 阅读全文
posted @ 2021-02-15 22:09
街出
阅读(6)
评论(0)
推荐(0)
浙公网安备 33010602011771号