ARRAY 3 DIMENSI VERSI JAVA BY riki darman(stmik-amik riau)
nah ini dosen struktur data yang paling ane kagumi . kemampuannya its ok, jangan ditanya lagi .ni dosen pernah jadi seorang programer di jawa nah .dosenni alumni budi luhur, nah kalo anak it dengar nama budi luhur pasti kagak lupa dengan pristiwa virus komputer yang merajalela. nah ternyata dosen ane ini salah satu pembuat virus.wah hebatkan. selaiin itu nih dosen juga ali banget dalam masalah hacker . wah top banget deh.
langsung ajah deh ni program array 3 dimensi versi java. semoga bermanfaat
ini skripnya:
package array3;
/**
*
* @author Riki
*/
public class Array3 {
public static void main(String[] args) {
int [] x;
x= new int [3];
x[0]=3;
x[1]=8;
x[2]=6;
System.out.println("Nilai X [0] :" + x [0]);
System.out.println("Nilai X [1] :" + x [1]);
System.out.println("Nilai X [2] :" + x [2]);
int [] y = new int [3];
y[0]=4;
y[1]=9;
y[2]=7;
System.out.println("Nilai Y [0] :" + y [0]);
System.out.println("Nilai Y [1] :" + y [1]);
System.out.println("Nilai Y [2] :" + y[2]);
int [] r = new int [3];
r[0]=8;
r[1]=7;
r[2]=4;
System.out.println("Nilai r [0] :" + r [0]);
System.out.println("Nilai r [1] :" + r [1]);
System.out.println("Nilai r [2] :" + r [2]);
int [] s = new int [3];
s[0]=9;
s[1]=5;
s[2]=9;
System.out.println("Nilai s [0] :" + s [0]);
System.out.println("Nilai s [1] :" + s [1]);
System.out.println("Nilai s [2] :" + s [2]);
int [] t = new int [3];
t[0]=9;
t[1]=4;
t[2]=4;
System.out.println("Nilai t [0] :" + t [0]);
System.out.println("Nilai t [1] :" + t [1]);
System.out.println("Nilai t [2] :" + t [2]);
int [] z ={8,9,3};
System.out.println("Nilai Z [0] :" + z [0]);
System.out.println("Nilai Z [1] :" + z [1]);
System.out.println("Nilai Z [2] :" + z [2]);
System.out.println("nilai Array x,y,r,s dan z : "+ x[0] + " " + y[0]+ " "+ r[0]+" "+ s[0] + z[0]);
System.out.println("nilai Array x,y,r,s dan z : "+ x[1] + " " + y[1]+ " "+ r[1]+" "+ s[1] + z[1]);
System.out.println("nilai Array x,y,r,s dan z : "+ x[2] + " " + y[2]+ " "+ r[2]+" "+ s[2] + z[2]);
}
}
langsung ajah deh ni program array 3 dimensi versi java. semoga bermanfaat
ini skripnya:
package array3;
/**
*
* @author Riki
*/
public class Array3 {
public static void main(String[] args) {
int [] x;
x= new int [3];
x[0]=3;
x[1]=8;
x[2]=6;
System.out.println("Nilai X [0] :" + x [0]);
System.out.println("Nilai X [1] :" + x [1]);
System.out.println("Nilai X [2] :" + x [2]);
int [] y = new int [3];
y[0]=4;
y[1]=9;
y[2]=7;
System.out.println("Nilai Y [0] :" + y [0]);
System.out.println("Nilai Y [1] :" + y [1]);
System.out.println("Nilai Y [2] :" + y[2]);
int [] r = new int [3];
r[0]=8;
r[1]=7;
r[2]=4;
System.out.println("Nilai r [0] :" + r [0]);
System.out.println("Nilai r [1] :" + r [1]);
System.out.println("Nilai r [2] :" + r [2]);
int [] s = new int [3];
s[0]=9;
s[1]=5;
s[2]=9;
System.out.println("Nilai s [0] :" + s [0]);
System.out.println("Nilai s [1] :" + s [1]);
System.out.println("Nilai s [2] :" + s [2]);
int [] t = new int [3];
t[0]=9;
t[1]=4;
t[2]=4;
System.out.println("Nilai t [0] :" + t [0]);
System.out.println("Nilai t [1] :" + t [1]);
System.out.println("Nilai t [2] :" + t [2]);
int [] z ={8,9,3};
System.out.println("Nilai Z [0] :" + z [0]);
System.out.println("Nilai Z [1] :" + z [1]);
System.out.println("Nilai Z [2] :" + z [2]);
System.out.println("nilai Array x,y,r,s dan z : "+ x[0] + " " + y[0]+ " "+ r[0]+" "+ s[0] + z[0]);
System.out.println("nilai Array x,y,r,s dan z : "+ x[1] + " " + y[1]+ " "+ r[1]+" "+ s[1] + z[1]);
System.out.println("nilai Array x,y,r,s dan z : "+ x[2] + " " + y[2]+ " "+ r[2]+" "+ s[2] + z[2]);
}
}
ah sumpah, lo ngebantu banget bro.. makasih, btw soundtracknya apaan bro, kok gw betah ngopi dimari
ReplyDelete