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

//Rinaldy Achmad Fauzy
//1301154357
//IF 39-07

package indexpoint;

import java.util.Scanner;

/**
*
* @author Rinaldy A
*/
public class IndexPoint {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
double p,mid,end,quiz,finals;
// int r=0;
// p = cin.nextInt();
Scanner cin=new Scanner(System.in);

// for (r=1; r<=p; r++ ){}
System.out.println("Masukkan Nilai UTS: ");
mid=cin.nextDouble();
System.out.println("Masukkan Nilai UAS: ");
end=cin.nextDouble();
System.out.println("Masukkan Nilai Quiz: ");
quiz=cin.nextDouble();
finals= (0.35*mid)+(0.4*end)+(0.25*quiz);

if (finals>=85 && finals<=100){
System.out.println("Excellent");
}
else if (finals>=75 && finals<=84){
System.out.println("Very Good");
}
else if (finals>=65 && finals<=74){
System.out.println("Good");
}
else if (finals>=50 && finals<=64){
System.out.println("Accepted");
}
else if (finals>=0 && finals<=49){
System.out.println("Failed");
}




}

}

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

//Rinaldy Achmad Fauzy
//1301154357
//IF 39-07

package primenumber;

import java.util.Scanner;

/**
*
* @author Rinaldy A
*/
public class PrimeNumber {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int bilangan1,x;
int z=0;
Scanner cin=new Scanner (System.in);
System.out.println("Input Bilangan: ");
bilangan1=cin.nextInt();
for (x=1; x<=bilangan1; x++){
if (bilangan1%x==0){
z=z+1;
}
}
if (z==2){
System.out.println("Bilangan ini adalah Prima");}
else{
System.out.println("Bilangan ini bukan bilangan Prima");}
}
}
61 changes: 61 additions & 0 deletions TemperatureConvert.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* 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.
*/

//Rinaldy Achmad Fauzy
//1301154357
//IF 39-07

package temperatureconvert;

import java.util.Scanner;

/**
*
* @author Rinaldy A
*/
public class TemperatureConvert {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
double celcius,reamur,fahrenheit,kelvin;
// boolean menu;
int i;
Scanner cin= new Scanner(System.in);

System.out.print("Masukkan Suhu dalam Celcius: ");
celcius=cin.nextDouble();

reamur=celcius*0.8;
fahrenheit=celcius*1.8+32;
kelvin=celcius+273;

System.out.println("Mau di Koneversikan ke?");
System.out.println("1.Reamur");
System.out.println("2.Fahrenheit");
System.out.println("3.Kelvin");
// menu=cin.nextBoolean();
i=cin.nextInt();

if (i==1) {
System.out.println("Suhu di dalam Reamur adalah: "+reamur+" R");
}
else if (i==2){
System.out.println("Suhu di dalam Fahrenheit adalah: "+fahrenheit+"F");
}
else if (i==3){
System.out.println("Suhu di dalam Kelvin adalah: "+kelvin+"K");
}
else {
System.out.println("TETOT! Maaf inputan tidak ada... ");
}


}

}