Bi Lang An Prim A

  • July 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Bi Lang An Prim A as PDF for free.

More details

  • Words: 89
  • Pages: 1
public class Bilanganprima { pubic static void main(string[] args) { //range int upperLimit = 30; int lowerlimit = 0; int counter = 0; system.out.print(Bilangan prima yang ada di antara " + lowerlimit +" - + upperlimit + " : "); //cari bilangan prima yang terletak di antara //upperlimit dan lowerlimit for(int i=lowerLimit;<=upperlimit;i++) { int factorcounter = 0; //hitung jumlah faktor dari bilangan ini for(int j=1;j<=i;j++) { } } //jika jumlah faktor=2 berarti ini adalah bilangan prima if(factorcounter==2){ counter++; system.out.print(i + ""); } } if(counter==0) system.out.print("tidak ada !") } }

Related Documents

Bi Lang An Prim A
July 2020 7
Bi Kich Lang Mai
July 2020 8
Prim
May 2020 22
Peru Lang An
November 2019 31
Struktur Peru Lang An
November 2019 26
Prim
November 2019 32