diff --git a/IndexPoint.java b/IndexPoint.java index 8b13789..bc3b572 100644 --- a/IndexPoint.java +++ b/IndexPoint.java @@ -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"); + } + + + + } + + +} diff --git a/PrimeNumber.java b/PrimeNumber.java index 8b13789..a69a43c 100644 --- a/PrimeNumber.java +++ b/PrimeNumber.java @@ -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); + + + } + } +} diff --git a/TemperatureConvert.java b/TemperatureConvert.java index e69de29..d691800 100644 --- a/TemperatureConvert.java +++ b/TemperatureConvert.java @@ -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); + } + + + } + +}