JAVA
import java.io.*;
public class Quiz{
public static void main(String Arg[])throws IOException{
String NIP; String NA;String nama;String NMID;String NUAS;String KET;String NH;
double kdNA=0;
int MID,UAS;
BufferedReader Get=new BufferedReader(new InputStreamReader(System.in));
System.out.print("NIP : ") ; NIP = Get.readLine() ;
System.out.print("Nama : ") ; nama = Get.readLine() ;
System.out.print("NMID : ") ; NMID = Get.readLine() ;
System.out.print("NUAS : ") ; NUAS = Get.readLine() ;
MID= Integer.parseInt(NMID);
UAS= Integer.parseInt(NUAS);
kdNA=(0.4 * MID) + (0.6 * UAS);
if(kdNA>=80){
NH="A";
KET="LULUS";
}else if(kdNA>=70){
NH="B";
KET="LULUS";
}else if(kdNA>=60){
NH="C";
KET="LULUS";
}else if(kdNA>=50){
NH="D";
KET="Gagal";
}else {
kdNA=0; NH="E";
KET="Gagal";
}
System.out.println("NH : " + NH);
System.out.println("KET :" + KET);
}
}
Hasilnya:
gak bisa ne,,,,,,,,,,,
BalasHapuskek mn y_ caranya,,,,,,,,,,,,,