Program Grade Nilai Java

Listing Program
import java.util.Scanner;
public class grade{
public static void main (String[]args){
Scanner input = new Scanner(System.in);
int plus, x, bagi, nuts, nuas;
System.out.println("Input Data");
System.out.print("Masukkan Nama Anda : ");
String nama = input.next();
System.out.print("Masukkan NPM Anda : ");
String npm = input.next();
System.out.print("Masukkan Kelas Anda : ");
String kelas = input.next();
System.out.print("Masukkan Mata kuliah : ");
String mk = input.next();
System.out.print("Masukkan Nilai UTS : ");
nuts = input.nextInt();
System.out.print("Masukkan Nilai UAS : ");
nuas = input.nextInt();
double na = 0.7* (double) nuts + 0.3* (double) nuas;
System.out.println();
System.out.println("Output data");
System.out.println("Nama : "+nama);
System.out.println("NPM : "+npm);
System.out.println("Kelas : "+kelas);
System.out.println("Nama : "+nama);
System.out.println("Mata Kuliah : "+mk);
System.out.println("Total Nilai : "+na);
if (na>=86){
  System.out.print("Grade : A");
}else if (na>=71){
  System.out.print("Grade : B");
}else if (na>=61){
  System.out.print("Grade : C");
}else if (na<=60){
System.out.print("Grade : D");
}
}
}
Output

Komentar

Postingan populer dari blog ini

Fixed Point dan Floating Point pada ALU

Pengenalan Teknologi Game dan Artificial Intelligence pada Game || Pengantar Teknologi Game || Tugas I

Program Deret Geometri Java