Problem: Find the greatest common divisor of two non-negative integers u and v. Step 1: If v equals 0, then we are done and the gcd is equal to u. Step 2: Calculate temp = u % v, u = v, v = temp and go back to step 1.
ปัญหา : หาตัวหารร่วมมากของจำนวนเต็มที่ไม่ใช่เชิงลบ 2 U และ V ขั้นตอนที่ 1 : ถ้า V มีค่าเท่ากับ 0 แล้วเราจะทำและ LCD เท่ากับ U ขั้นตอนที่ 2 : การคำนวณอุณหภูมิ = u % v , U = V , V = ชั่วคราวและกลับไปที่ขั้นตอนที่ 1 .