Matrix
Reading and Printing Matrix import java.util.Scanner; public class MatrixInput { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); // Reading number of rows and columns System.out.println("Enter the number of rows:"); int rows = scanner.nextInt(); System.out.println("Enter the number of columns:"); int columns = scanner.nextInt(); // Initializing the matrix int[][] matrix = new int[rows][columns]; // Reading the matrix elements System.out.println("Enter the elements of the matrix:"); for (int i = 0; i < rows; i++) { for (int j = 0; j < columns; j++) { ...