contoh script java hitung nilai

contoh script java hitung nilai

class NilaiArgs{

public static void main(String args[]){

String nama;

double uts,uas;



nama = args[0];

uts = Double.parseDouble(args[1]);

uas = Double.parseDouble(args[2]);



System.out.println("Nama : "+nama);

System.out.println("Nilai UTS : "+uts);

System.out.println("Nilai UAS : "+uas);



double nilaiAkhir = (uts + uas)/2;

System.out.println("Nilai Akhir : "+nilaiAkhir);

}

}



Share this:

Enter your email address to get update from Kompi Ajaib.

Tidak ada komentar