-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathmatriks3x3.java
More file actions
30 lines (30 loc) · 821 Bytes
/
matriks3x3.java
File metadata and controls
30 lines (30 loc) · 821 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
import java.io.*;
class Matrix3x3
{
public static void main(String args[]) throws IOException
{
BufferedReader BR=new BufferedReader(new InputStreamReader (System.in));
int Number[][]=new int[3][3];
int i,j;
String m;
System.out.println("Enter Elements for Matrix 3x3 :");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
m=BR.readLine();
Number[i][j]=Integer.parseInt(m);
}
}
System.out.println("Elements in Matrix are : ");
System.out.println("");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
System.out.print(Number[i][j]+"\t");
}
System.out.println();
}
}
}