随笔分类 - java
摘要:3X4 二维数组 求每行的最大值与第一列进行交换,输出原始数据和交换后的数据。
阅读全文
摘要:1 import java.util.Random; 2 public class { 3 4 public static void main(String[] args) { 5 int arr[][]=new int [3][4]; 6 int i,j,k; 7 for(i=0;i<arr.le
阅读全文
摘要:1 import java.util.*; 2 public class xxx { 3 4 public static void main(String[] args) { 5 Random sc=new Random(); 6 int b[][]=new int [5][6]; 7 int i,
阅读全文
摘要:1 public class a { 2 public static void main(String[] args) { 3 int arr[]=new int[] {9,8,3,5,2,90,23}; 4 for (int i=0;i<arr.length;i++) 5 { 6 System.o
阅读全文
摘要:1 public class number { 2 3 public static void main(String[] args) { 4 char a[]=new char[26]; 5 int i; 6 for(i=0;i<26;i++) 7 { 8 a[i]=(char)('a'+i); 9
阅读全文
摘要:1 public class a { 2 public static void main(String[] args){ 3 int i=1,j=1; 4 for (i=1;i<=9;i++) 5 { 6 for (j=1;j<=8+i;j++) 7 8 { 9 if(i+j<=9) 10 { 11
阅读全文
摘要:1 public class a{ 2 public static void main(String[] args) { 3 4 int i=1; 5 for (i=1;i<=9;i++) 6 { 7 for (int k=1;k<=9-i;k++) 8 { 9 System.out.print("
阅读全文
摘要:1 public class number { 2 3 public static void main(String[] args) { 4 5 int i=1,j=1; 6 for (i=-8;i<=8;i++) 7 { 8 for(j=1;j<=8+9-Math.abs(i);j++) { 9
阅读全文
摘要:1 2 3 public class a{ 4 5 public static void main(String[] args) { 6 7 int h=10;//猴子的数量 8 int t=3;//每三次踢一个猴子 9 int arr[]=new int[h];//声明数组 10 for(int
阅读全文

浙公网安备 33010602011771号