JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
Author: Xan
Date: 14th April 2018
Original question:
https://www.sololearn.com/Discuss/1215057/how-to-update-an-array-automatically
Read values for a matrix, from the user, and then display the matrix to prove
it's worked properly.
Note: No decent error checking... this is just a quick demo.
Usage: Enter six integers for the 2 x 3 matrix.
*/
import java.util.Scanner;
public class Program
{
public static void main(String[] args)
{
int columns = 2;
int rows = 3;
Scanner scanner = new Scanner(System.in);
int[][] matrix = new int[columns][rows];
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run