Listing Program Java Data Nilai Mahasiswa dengan Seleksi

import java.io.*;
public class tugasku
{
public static void main(String[]args) throws IOException
{
double na;
char nh;
int ua,ut,tu;
String nim,nama,progdi,fakultas,tugas,uts;
BufferedReader br =new BufferedReader (new InputStreamReader(System.in));
System.out.print("Masukkan NIM        : ");
nim=br.readLine();
System.out.print("Masukkan Nama         : ");
nama=br.readLine();
System.out.print("Masukkan Fakultas         : ");
fakultas=br.readLine();
System.out.print("Masukkan Progdi        : ");
progdi=br.readLine();
System.out.print("Masukkan Nilai tugas 1         : ");
tugas=br.readLine();
System.out.print("Masukkan Nilai UTS  : ");
uts=br.readLine();

ut=Integer.parseInt(uts);
tu=Integer.parseInt(tugas);
na=(tu*0.2)+(ut*0.8);

if(na>100){
nh='X';
}
else if(na>=80){
nh='A';
} else if (na>70)
{
nh='B';
}
else if (na>60){
nh='c';
} else if (na>50)

{
nh='D';
} else  {
nh='E';
}
System.out.println("");
System.out.println("=====================================");
System.out.println("NIM    : "+nim);
System.out.println("Nama   : "+fakultas);
System.out.println("Nama   : "+nama);
System.out.println("Progdi : "+progdi);
System.out.println("tugas   : "+tugas);
System.out.println("UTS    : "+ut);
System.out.println("Nilai Akhir  : "+na);
System.out.println("Nilai Huruf  : "+nh);
System.out.println("=====================================");
}
}
Previous
Next Post »