2023.7.17 周一:多维数组
1 import java.sql.SQLOutput; 2 import java.util.Scanner; 3 //多维数组 4 public class test { 5 public static void main(String[] args) { 6 Scanner sc = new Scanner(System.in); 7 int[][] array = new int[3][4]; 8 for(int i = 0;i<3;i++){ 9 for(int j = 0;j<4;j++){ 10 array[i][j] = sc.nextInt(); 11 } 12 } 13 System.out.println("===================="); 14 for(int i = 0;i<3;i++){ 15 for(int j = 0;j<4;j++){ 16 System.out.print(array[i][j]+" "); 17 } 18 System.out.println(); 19 } 20 sc.close(); 21 } 22 }
 
                    
                     
                    
                 
                    
                 
 
         
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号