TUGAS SUN GO KONG
/**
* @(#)sungokong.java
*
*
* @author
* @version 1.00 2015/3/3
*/
import java.util.Scanner;
import java.io.*;
public class sungokong {
public static void main (String[]args){
Scanner input = new Scanner (System.in);
double word,excel,acces,total;
String siswa;
System.out.println("NILAI MAHASISWA");
System.out.println("");
System.out.print("Nama Siswa = ");
siswa = input.nextLine();
System.out.print("Nilai word = ");
word = input.nextInt();
System.out.print("Nilai excel = ");
excel = input.nextInt();
System.out.print("Nilai acces = ");
acces = input.nextInt();
System.out.print(""+(siswa));
System.out.print("");
total = (word+excel+acces)/(3);
if (total>=88)
System.out.print(" Nilai Anda A,Anda Lulus");
if (total>=66 && total < 88)
System.out.print(" Nilai Anda B,Anda Lulus");
if (total>=55 && total < 66)
System.out.print(" Nilai Anda C,Anda Lulus");
if (total>=41 && total < 55)
System.out.print(" Nilai Anda D,Anda Tidak Lulus");
if (total<41)
System.out.print(" Nilai Anda E,Anda Tidak Lulus");
}
}
OUTPUT :
Tidak ada komentar:
Posting Komentar