import java.io.*;public class input_arfor {
public static void main (String[] args)throws IOException
{
String keterangan,ket;
double nilai[]=new double[2];
int angka[]=new int[4];
double akhir;
String nama[]=new String[6];
String nim[]=new String[4];
int i;
for(i=1;i<3;i++)
{
BufferedReader br;
br=new BufferedReader (new InputStreamReader(System.in));
angka[i]=i;
System.out.println(" Data ke "+angka[i]);
System.out.println("========================================");
System.out.print("Masukkan nama = ");
nama[i]=br.readLine();
System.out.print("Masukkan nim = ");
nim[i]=br.readLine();
System.out.print("Masukkan Nilai UTS = ");
nilai[0]=Double.parseDouble(br.readLine());
System.out.print("Masukkan Nilai UAS = ");
nilai[1]=Double.parseDouble(br.readLine());
akhir=(0.4*nilai[0])+(0.6*nilai[1]);
if (akhir>60)
keterangan= "Anda Lulus";
else
keterangan= "Anda Gagal";
if (akhir>=90)
ket = "A";
else if (akhir>=80)
ket = "A-";
else if (akhir>=70)
ket = "B+";
else if (akhir>=60)
ket = "B";
else if (akhir>=50)
ket = "B-";
else if (akhir>=45)
ket = "C+";
else if (akhir>=40)
ket = "C";
else if (akhir>=30)
ket = "C-";
else if (akhir>=20)
ket = "D";
else
ket = "E";
System.out.println("");
System.out.println("========================================");
System.out.println("Data ke = " +angka[i]);
System.out.println("Nama = " +nama[i]);
System.out.println("NIM = " +nim[i]);
System.out.println("Nilai uts = " +nilai[0]);
System.out.println("Nilai uas = " +nilai[1]);
System.out.println("Hasil Akhir = " +akhir);
System.out.println("Nilai Huruf = " +ket);
System.out.println("Keterangan = " +keterangan);
System.out.println("=========================================");
System.out.println();
}
}
}
public static void main (String[] args)throws IOException
{
String keterangan,ket;
double nilai[]=new double[2];
int angka[]=new int[4];
double akhir;
String nama[]=new String[6];
String nim[]=new String[4];
int i;
for(i=1;i<3;i++)
{
BufferedReader br;
br=new BufferedReader (new InputStreamReader(System.in));
angka[i]=i;
System.out.println(" Data ke "+angka[i]);
System.out.println("========================================");
System.out.print("Masukkan nama = ");
nama[i]=br.readLine();
System.out.print("Masukkan nim = ");
nim[i]=br.readLine();
System.out.print("Masukkan Nilai UTS = ");
nilai[0]=Double.parseDouble(br.readLine());
System.out.print("Masukkan Nilai UAS = ");
nilai[1]=Double.parseDouble(br.readLine());
akhir=(0.4*nilai[0])+(0.6*nilai[1]);
if (akhir>60)
keterangan= "Anda Lulus";
else
keterangan= "Anda Gagal";
if (akhir>=90)
ket = "A";
else if (akhir>=80)
ket = "A-";
else if (akhir>=70)
ket = "B+";
else if (akhir>=60)
ket = "B";
else if (akhir>=50)
ket = "B-";
else if (akhir>=45)
ket = "C+";
else if (akhir>=40)
ket = "C";
else if (akhir>=30)
ket = "C-";
else if (akhir>=20)
ket = "D";
else
ket = "E";
System.out.println("");
System.out.println("========================================");
System.out.println("Data ke = " +angka[i]);
System.out.println("Nama = " +nama[i]);
System.out.println("NIM = " +nim[i]);
System.out.println("Nilai uts = " +nilai[0]);
System.out.println("Nilai uas = " +nilai[1]);
System.out.println("Hasil Akhir = " +akhir);
System.out.println("Nilai Huruf = " +ket);
System.out.println("Keterangan = " +keterangan);
System.out.println("=========================================");
System.out.println();
}
}
}
No comments:
Post a Comment
Your comments are very valuable