pscudeo :
1 identifikasi variable batasatas, batasbawah, hitung
2.masukan nilai batas atas dan batasakhir
3.proses
4. selesai
Prima.java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Prima {
public static void main(String[] args) {
BufferedReader dataln = new BufferedReader(new InputStreamReader(System.in));
int batasawal;
int batasakhir;
int hitung;
try{
System.out.println("Masukkan Nilai Batas Atas : ");
batasawal = Integer.parseInt(dataln.readLine());
System.out.println("Masukkan Nilai Batas Bawah : ");
batasakhir = Integer.parseInt(dataln.readLine());
for(int i=batasawal;i<=batasakhir;i++){
hitung=0;
for(int a=1;a<=i;a++){
if(i%a==0){
hitung+=1;
}
}
if(hitung==2){
System.out.println(i);
}
if(batasawal>batasakhir){
System.out.println("batas akhir tidak boleh kecil dari batas awal");
}
}
}catch(IOException e){
System.out.println("Error!");
}
}
}
PS: we're truly sorry due some reason we'll hibernate this project,
regards : admin-hevaguideonline