import javax.swing.*;
class kondisi{
public static void main(String [] args){
int uts = Integer.parseInt(JOptionPane.showInputDialog("Input nilai UTS : "));
int uas = Integer.parseInt(JOptionPane.showInputDialog("Input nilai UAS : "));
int hasil = (uts + uas)/2;
if (hasil > 80){
JOptionPane.showInputDialog(null,"Total Nilai : "+hasil+"\nGrade A");}
else if (hasil > 60){
JOptionPane.showInputDialog(null,"Total Nilai : "+hasil+"\nGrade B");}
else if (hasil > 50){
JOptionPane.showInputDialog(null,"Total Nilai : "+hasil+"\nGrade C");}
else if (hasil > 40){
JOptionPane.showInputDialog(null,"Total Nilai : "+hasil+"\nGrade D");}
else{
JOptionPane.showInputDialog(null,"Total Nilai : "+hasil+"\nGrade E");}
}}
Sihlakan menyoba yeh bro... d jamin 100% runing..
Tidak ada komentar:
Posting Komentar