0% found this document useful (0 votes)
20 views

Tugas Javaer

This document contains the source code for a Java program that takes student input for name, student ID, course, quiz score, midterm score, and final exam score. It then calculates the student's final grade based on a weighted average of those scores and assigns a letter grade between A-E based on the percentage range. The program outputs the student details and final grade.

Uploaded by

Rizky Kyboardiz
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Tugas Javaer

This document contains the source code for a Java program that takes student input for name, student ID, course, quiz score, midterm score, and final exam score. It then calculates the student's final grade based on a weighted average of those scores and assigns a letter grade between A-E based on the percentage range. The program outputs the student details and final grade.

Uploaded by

Rizky Kyboardiz
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

RIZKY CITRA ASID

14.01.061
TI2A

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package tugasjava;
import java.util.*;
/**
*
* @author INTEL

*/
public class Tugasjava {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here

double na;
Scanner in = new Scanner (System.in);
System.out.println ("Nama") ;
String nama=in.nextLine();
System.out.println ("NIM") ;
String nim=in.nextLine();
System.out.println ("Mata Kuliah") ;
String matakuliah=in.nextLine();
System.out.println("kuis : ");
int kuis=in.nextInt();
System.out.println("uts : ");
int uts=in.nextInt();
System.out.println("uas : ");
int uas=in.nextInt();
String nilai=in.nextLine();
na=(kuis*0.3)+(uts*0.3)+(uas*0.4);
if (na>=90 && na<=100){

nilai=("A");
}
else if (na>=79 && na<=89){
nilai=("B");
}
else if (na>=60 && na<=78){
nilai=("C");
}
else if (na>=47 && na<=59) {
nilai=("D");
}
else if (na<=46){
nilai=("E");
}

System.out.println("NIM : "+nim);
System.out.println("Nama : "+nama);
System.out.println("Mata Kuliah : "+matakuliah);
System.out.println("Nilai Kuis : "+kuis);
System.out.println("Nilai UTS : "+uts);
System.out.println("Nilai UAS : "+uas);
System.out.println("Nilai Akhir : "+nilai);
}
}

You might also like