You are on page 1of 2

public class Soal2a {

public static void main(String[] args) {


// TODO Auto-generated method stub

int A[]= {1,2,3,4,5,6};

System.out.println("Unit : "+0+" : "+A[0]);


System.out.println("Unit : "+2+" : "+A[1]);
System.out.println("Unit : "+4+" : "+A[2]);
System.out.println("Unit : "+6+" : "+A[3]);
System.out.println("Unit : "+8+" : "+A[4]);
System.out.println("Unit : "+10+" : "+A[5]);

public class Soal2b {

public static void main(String[] args) {


// TODO Auto-generated method stub

int A[]= {1,2,3,4,5,6,7,8,9,10,11};

System.out.println("Unit : "+0+" : "+A[0]);


System.out.println("Unit : "+2+" : "+A[2]);
System.out.println("Unit : "+4+" : "+A[4]);
System.out.println("Unit : "+6+" : "+A[6]);
System.out.println("Unit : "+8+" : "+A[8]);
System.out.println("Unit : "+10+" : "+A[10]);

}
public class Soal2c {

public static void main(String[] args) {


// TODO Auto-generated method stub

int A[]= {0,1,2,3,4,5,6,7,8,9,10,11};

System.out.println("Unit : "+0+" : "+A[0]);


System.out.println("Unit : "+1+" : "+A[1]);
System.out.println("Unit : "+3+" : "+A[3]);
System.out.println("Unit : "+6+" : "+A[6]);
System.out.println("Unit : "+10+" : "+A[10]);
}

You might also like