Skip to content · ⁨Lompat ke konten⁩

Greatest common divisor · ⁨Pengangka persekutuan terbesar⁩

English

Greatest common divisor

The GCD of two numbers is the largest integer that divides both. Euclid's algorithm is beautifully short: while b isn't 0, replace the pair (a, b) with (b, a % b). When b reaches 0, a is the answer.

Bahasa Indonesia

Pembagi persekutuan terbesar

FPB dari dua bilangan adalah integer terbesar yang dapat membagi keduanya. Algoritma Euclid sangat ringkas: selama b tidak 0, ganti pasangan (a, b) dengan (b, a % b). Ketika b mencapai 0, a adalah jawabannya.

Log in or create account · ⁨Masuk atau buat akun⁩

IGCSE, A-Level & AP