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
48 changes: 48 additions & 0 deletions IndexPoint.java
Original file line number Diff line number Diff line change
@@ -1 +1,49 @@

/*
* 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 No1;

import java.util.Scanner;
/**
*
* @author rizkiaulia
*/
public class indexnilai
{
public static void main(String[] args) {
Scanner Input = new Scanner (System.in);
System.out.print("Masukkan Nilai CLO1 : ");
int CLO1 = Input.nextInt();
System.out.print(" Nilai CLO2 : ");
int CLO2 = Input.nextInt();
System.out.print(" Nilai CLO3 : ");
int CLO3 = Input.nextInt();

int nilai;
nilai = (CLO1*25)/100;
nilai = nilai+(CLO2*35/100);
nilai = nilai+(CLO3*40/100);

if (nilai >= 80) {
System.out.println("Sangat Bagus");
}
else if (nilai >= 70) {
System.out.println("Baik sekali");
}
else if (nilai >= 60) {
System.out.println("Cukup Baik");
}
else if (nilai >= 50){
System.out.println("Baik");
}
else {
System.out.println("Sangat Jelek");
}

}
}


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

import java.util.Scanner;
/**
*
* @author rizkiaulia
*/
public class BilanganPrima
{
public static void main(String[] args) {
Scanner Input = new Scanner (System.in);
System.out.print("Masukkan Angka: ");
int angka = Input.nextInt();

boolean prima = true;
for (int p=2 ; p < angka ; p++ )
{
if ((angka % p ) == 0)
{
prima = false;
break;
}
}

if (angka == 1)
System.out.print("Angka yang Anda masukkan bukan bilangan prima ");

else
if (prima)

System.out.print("Angka yang Anda masukkan bilangan prima ");
else

System.out.print("Angka yang Anda masukkan bukan bilangan prima ");

}


}

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 No3;

import java.util.Scanner;
/**
*
* @author rizkiaulia
*/

public class TemperaturConvert
{
public static void main(String[] args)
{
Scanner Input = new Scanner (System.in);
System.out.print("Masukkan Bilangan Celcius : ");

double derajatcelcius = Input.nextInt();

System.out.println("1. Fahrenheit. ");
System.out.println("2. Kelvin. ");
System.out.println("3. Reamur. ");

System.out.print("Pilihan : ");
int pilih = Input.nextInt();
double x = 0;

if (pilih == 1) {
x = (1.8 * derajatcelcius) + 32;
}
else if (pilih == 2 ){
x = (273 + derajatcelcius);
}
else if (pilih == 3){
x = 0.8 * derajatcelcius;
}

System.out.println("Hasil : "+x);

}
}



}