public class LatihanArray {
public static void main(String[]args){
String data [];
data=new
String[5];
data[0]="Putri Ranna Nadya";
data[1]="XI
IPS";
data[2]="75";
data[3]="93";
data[4]="100";
System.out.println("Nama
Lengkap= "+data[0]);
System.out.println("Kelas= "+data[1]);
System.out.println("Nilai Agama= "+data[2]);
System.out.println("Nilai PKN= "+data[3]);
System.out.println("Nilai B.ind= "+data[4]);
System.out.println("- - - - - - - - - - - - - - -
");
System.out.println(" ");
String data2 [];
data2=new
String[5];
data2[0]="Lee
Taemin";
data2[1]="XI
IPS";
data2[2]="97";
data2[3]="93";
data2[4]="100";
System.out.println("Nama Lengkap= "+data2[0]);
System.out.println("Kelas= "+data2[1]);
System.out.println("Nilai Agama= "+data2[2]);
System.out.println("Nilai PKN= "+data2[3]);
System.out.println("Nilai B.ind= "+data2[4]);
}
}
Tidak ada komentar:
Posting Komentar