Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions IndexPoint.java
Original file line number Diff line number Diff line change
@@ -1 +1,58 @@
/*
* 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 IndexPoint;

import java.util.Scanner;





/**
*
* @author A455ld
*/
public class IndexPoint {

public static void main(String[] args) {
Scanner score = new Scanner (System.in);
int cekgrade;
int nilaiUTS;
int nilaiUAS;
int nilaiQuiz;

System.out.println("Masukkan Score");

System.out.println("Masukkan nilai UTS :");
nilaiUTS = score.nextInt();
System.out.println("Masukkan nilai UAS :");
nilaiUAS = score.nextInt();
System.out.println("Masukkan nilai Quiz :");
nilaiQuiz = score.nextInt();

if ((nilaiUTS * 0.35 + nilaiUAS * 0.40 + nilaiQuiz * 0.25) >= 85 ){
System.out.println("excellent");

}else if ((nilaiUTS * 0.35 + nilaiUAS * 0.40 + nilaiQuiz * 0.25) >= 75 ){
System.out.println("Verry Good");

}else if ((nilaiUTS * 0.35 + nilaiUAS * 0.40 + nilaiQuiz * 0.25) >= 65 ){
System.out.println("Good");

}else if ((nilaiUTS * 0.35 + nilaiUAS * 0.40 + nilaiQuiz * 0.25) >= 50 ){
System.out.println("Accepted");

}else if ((nilaiUTS * 0.35 + nilaiUAS * 0.40 + nilaiQuiz * 0.25) <= 49 ){
System.out.println("Failed");
}



}


}

25 changes: 25 additions & 0 deletions PrimeNumber.java
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
/*
* 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 PrimeNumber;

/**
*
* @author A455ld
*/
public class PrimeNumber {
public static void main(String[] args) {
int i,k;
for (int j = 2; j < 20; j++) {
for (int l = 2; l <= (j/2); l++)

if((j%l)==0) break;


System.out.println(j);


}
}
}
48 changes: 48 additions & 0 deletions TemperatureConvert.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* 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 TemperatureConvert;

import java.util.Scanner;

/**
*
* @author A455ld
*/
public class TemperatureConvert {
public static void main(String[] args) {
Scanner derajat = new Scanner (System.in);
double ceksuhu ;


System.out.println("tentukan suhu saat ini (celcius):");
ceksuhu = derajat.nextDouble();

System.out.println("pilihan konversi");
System.out.println("[1]fahrenheit\n[2]kelvin\n[3]rheamur");
int pk = derajat.nextInt();




if (pk==1){
ceksuhu = ceksuhu * 9/5 + 32;
System.out.println("hasil : "+ceksuhu);

}else if (pk==2){

ceksuhu = ceksuhu + 273.15;
System.out.println("hasil : "+ceksuhu);

}else if (pk==3){

ceksuhu = ceksuhu * 0.8;
System.out.println("hasil : "+ceksuhu);
}


}

}