Skip to content

hardw0607/Matrics-Arrays-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Matrics-Arrays-Java

Matrics Arrays Java import java.util.Scanner;

public class Matrics { public static void main(String[] args){ int matrix[][] = new int[3][3]; int n = matrix.length, m = matrix[0].length;

    Scanner sc = new Scanner(System.in);
    for(int i=0; i<n; i++){
        for(int j=0; j<m; j++){
            matrix[i][j] = sc.nextInt();
        }
    }
    //output
    for(int i=0; i<n; i++){
        for(int j=0; j<m; j++){
            System.out.print(matrix[i][j] + " ");
        }
        System.out.println();
    }
}

} //just output bekow //1 2 3 4 5 6 7 8 9 //1 2 3 //4 5 6 //7 8 9

About

Matrics Arrays Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published