Menghitung FPB dan KPK Dengan Java Console
Membuat program FPB dan KPK hasila source codenya
import java.util.Scanner;
public class kpkfpb
{
public static void main(String[] args)
{
Scanner baca = new Scanner(System.in);
int a;
int b;
int c;
int fpb;
int kpk;
int x;
boolean ulang = true;
do
{
System.out.print("\nmasukkan dua buah angka: ");
a = baca.nextInt();
baca.nextLine();
System.out.print(" dan ");
b = baca.nextInt();
baca.nextLine();
x = a * b;
do
{
c = a % b;
a = b;
b = c;
}
while (b != 0);
fpb = a;
kpk = x / fpb;
System.out.println("\nkpk = "+kpk);
System.out.println("fpb = "+fpb);
ulang = true;
}
while
(ulang!=false);
}
}
vans shoes
ReplyDeletefila disruptor
adidas gazelle
fila shoes
jordan shoes
offwhite
cheap nba jerseys
hermes bags
golden goose outlet
air jordan
adidas yeezy
ReplyDeletegolden goose outlet
supreme clothing
adidas yeezy
yeezy
golden goose
golden goose outlet
golden goose
goyard
supreme clothing