Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Java2L11 {
- public static void main(String[] args) {
- // 2D array
- // 2 dimension array
- //dmoj.ca
- //ccc18s2
- // type[][] name = new type[rowsize][colsize];
- int[][] A = new int[2][4];
- Scanner sc = new Scanner(System.in);
- for (int r=0; r<2; r++) { //One loop control row change
- for (int c=0; c<4; c++) { //One loop control col change
- A[r][c] = sc.nextInt();
- }
- }
- for (int r=0; r<2; r++) { //One loop control row change
- for (int c=0; c<4; c++) { //One loop control col change
- System.out.print(A[r][c]+" ");
- }
- System.out.println(); //new line
- }
- //ccc16j2
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement