Twentythree Zone

import java.io.*;
class nilaiakhir
public static void main (String[] args)
{
  double totalnilai;
    int absen,tugas,uts,uas;
try
{
BufferedReader input=new BufferedReader (new InputStreamReader (System.in));
System.out.print("Nama mahasiswa : ");
String mhs=input.readLine();

BufferedReader input2=new BufferedReader (new InputStreamReader (System.in));
System.out.print("Mata kuliah : ");
String matkul=input2.readLine();

BufferedReader input3=new BufferedReader (new InputStreamReader (System.in));
System.out.print("Nilai Absensi: ");
String st=input3.readLine();
int Nabsen = Integer.valueOf(st).intValue();


BufferedReader input4=new BufferedReader (new InputStreamReader (System.in));
System.out.print("Nilai Tugas: ");
String st2=input4.readLine();
int Ntugas = Integer.valueOf(st2).intValue();

BufferedReader input5=new BufferedReader (new InputStreamReader (System.in));
System.out.print("Nilai UTS: ");
String st3=input5.readLine();
int Nuts = Integer.valueOf(st3).intValue();

BufferedReader input6=new BufferedReader (new InputStreamReader (System.in));
System.out.print("Nilai UAS: ");
String st4=input3.readLine();
int Nuas = Integer.valueOf(st4).intValue();

// isi variabel
  absen=Nabsen*15/100;
  tugas=Ntugas*15/100;
  uts=Nuts*30/100;
  uas=Nuas*40/100;
  totalnilai=(absen+tugas+uts+uas);
 
  if (totalnilai >=70)
  {
  System.out.println("nama mahasiswa : "+mhs);
  System.out.println("mata kuliah : "+matkul);
  System.out.println("nilai anda adalah : "+totalnilai);
  System.out.println("anda dinyatakan LULUS");
  } else if (totalnilai>=60 && totalnilai<=69)
  {
  System.out.println("nama mahasiswa : "+mhs);
  System.out.println("mata kuliah : "+matkul);
  System.out.println("nilai anda adalah : "+totalnilai);
  System.out.println("anda dinyatakan HARUS REMIDIAL KEMBALI");
  }else if (totalnilai<=59)
  {
  System.out.println("nama mahasiswa : "+mhs);
  System.out.println("mata kuliah : "+matkul);
  System.out.println("nilai anda adalah : "+totalnilai);
  System.out.println("anda dinyatakan GAGAL");
  }else{
  System.out.println("nilai anda adalah : "+totalnilai);
  }
  }
  catch (Exception e)
  {
  e.printStackTrace ();
  }
  }
  }

Categories:

Leave a Reply