-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharray.java
More file actions
36 lines (26 loc) · 720 Bytes
/
Copy patharray.java
File metadata and controls
36 lines (26 loc) · 720 Bytes
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
29
30
31
32
33
34
35
36
package srimathi;
import java.util.*;
public class array {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc =new Scanner(System.in);
{
int i;
int [][]arr=new int [2][2];
System.out.println("enter the array value");
for( i=0;i<2;i++)
{
for(int j=0;j<2;j++)
arr[i][j]=sc.nextInt();
System.out.println();
}
System.out.println("The matrix is:");
for( i=0;i<2;i++)
{
for(int j=0;j<2;j++)
System.out.printf("\t %d",arr[i][j]);
System.out.println();
}
}
}
}