package kelompok;
import java.io.*;
public class array3 {
public static void main(String[] args) {
String input;
int dat[][][]=new int[3][3][3];
BufferedReader data=new BufferedReader(new InputStreamReader(System.in));
try{
System.out.println("Masukkan Matrik A");
System.out.println("===========================");
for(int a=0;a<2;a++)
{
for(int b=0;b<2;b++)
{
for(int c=0;c<=2;c++)
{
System.out.print("Elemen ke "+(a)+","+(b)+","+(c)+" : ");input=data.readLine();
dat[a][b][c]=Integer.parseInt(input);
}
}
}
}
catch (IOException e){
System.out.print("EROR");
}
//OUTPUT
for(int a=0;a<2;a++)
{
for(int b=0;b<2;b++)
{
for(int c=0;c<=2;c++)
{
System.out.print(" "+dat[a][b][c]+" ");
}
System.out.println();
}
}
}
}
You Might Also Like :
1 komentar:
thank's ya? atas semua postingannya....membantu sekali bagi kami yang pemula....
Posting Komentar