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
50 changes: 50 additions & 0 deletions IndexPoint.java
Original file line number Diff line number Diff line change
@@ -1 +1,51 @@
/*
* 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 made rama_1301154203
*/
public class No2 {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner Input = new Scanner (System.in);
System.out.print("Masukkan Nilai Kuis : ");
int kuis = Input.nextInt();
System.out.print(" Nilai UTS : ");
int uts = Input.nextInt();
System.out.print(" Nilai UAS : ");
int uas = Input.nextInt();

int nilai;
nilai = (kuis*25)/100;
nilai = nilai+(uts*35/100);
nilai = nilai+(uas*40/100);

if (nilai >= 85) {
System.out.println("excellent");
}
else if (nilai >= 75) {
System.out.println("very good");
}
else if (nilai >= 65) {
System.out.println("good");
}
else if (nilai >= 50){
System.out.println("accepted");
}
else {
System.out.println("failed");
}

}
}

47 changes: 47 additions & 0 deletions PrimeNumber.java
Original file line number Diff line number Diff line change
@@ -1 +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 no1;


import java.util.Scanner;


/**
*
* @author made rama_1301154203
*/
public class No1 {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner Input = new Scanner (System.in);
System.out.print("Masukkan bilangan : ");
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("Bilangan yang Anda masukkan ini bukan bilangan prima ");
else
if (prima)
System.out.print("Bilangan yang Anda masukkan ini adalah bilangan prima ");
else
System.out.print("Bilangan yang Anda masukkan ini bukan bilangan prima ");

}

}

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

/**
*
* made rama_1301154203
*/
public class No3 {
public static void main(String[] args) {
Scanner Input = new Scanner (System.in);
System.out.print("Masukkan Bilangan dalam Bentuk Celcius : ");
double bilcelcius = Input.nextInt();

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

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

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

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

}
}