/**
* @(#)input_array.java
*
*
* @ahmad quzwaini
* @version 1.00 2012/3/28
*/
import java.io.*;
public class input_array {
public static void main(String[]args)throws IOException
{
String keterangan;
double na,uts,uas;
Double angka[]=new Double[2];
BufferedReader br;
br=new BufferedReader(new InputStreamReader(System.in));
System.out.print("Masukkan Nilai UTS = ");
angka[0]=Double.parseDouble(br.readLine());
System.out.print("Masukkan Nilai UAS = ");
angka[1]=Double.parseDouble(br.readLine());
uts=angka[0];
uas=angka[1];
na=(0.4*uts)+(0.6*uas);
if (na>60)
keterangan="LULUS";
else
keterangan="TIDAK LULUS";
System.out.println("");
System.out.println("Nilai UTS = "+uts);
System.out.println("Nilai UAS = "+uas);
System.out.println("Nilai Akhir = "+na);
System.out.println("Keterangan = "+keterangan);
System.out.println("=========================================");
}
}
* @(#)input_array.java
*
*
* @ahmad quzwaini
* @version 1.00 2012/3/28
*/
import java.io.*;
public class input_array {
public static void main(String[]args)throws IOException
{
String keterangan;
double na,uts,uas;
Double angka[]=new Double[2];
BufferedReader br;
br=new BufferedReader(new InputStreamReader(System.in));
System.out.print("Masukkan Nilai UTS = ");
angka[0]=Double.parseDouble(br.readLine());
System.out.print("Masukkan Nilai UAS = ");
angka[1]=Double.parseDouble(br.readLine());
uts=angka[0];
uas=angka[1];
na=(0.4*uts)+(0.6*uas);
if (na>60)
keterangan="LULUS";
else
keterangan="TIDAK LULUS";
System.out.println("");
System.out.println("Nilai UTS = "+uts);
System.out.println("Nilai UAS = "+uas);
System.out.println("Nilai Akhir = "+na);
System.out.println("Keterangan = "+keterangan);
System.out.println("=========================================");
}
}
No comments:
Post a Comment
Your comments are very valuable