Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Wildan Jazuli 107091002714 TI4B

import java.io.*;

public class ordo34


{
public static void main(String[]args)
{
int[][]M = new int [3][4];
int i,j;

BufferedReader isi;
System.out.println("Input Elemen Matriks M[3][4]");

try
{
isi = new BufferedReader(new InputStreamReader(System.in));
for(i=0;i<3;i++)
{
for(j=0;j<4;j++)
{
System.out.print("M[" +i +"," +j +"] = ");
M[i][j]=new Integer(isi.readLine()).intValue();
}
}
}
catch(Exception e)
{
System.out.println("Input Berupa Integer Aja");
}

System.out.println("\n");
System.out.println("Matriks 3x4");

for(i=0;i<3;i++)
{
for(j=0;j<4;j++)
{
System.out.print(M[i][j] +" ");
}
System.out.println("");
}

}}
Wildan Jazuli 107091002714 TI4B

You might also like