This project implements a function to find the Least Common Multiple of two numbers.
The algorithm uses an efficient iterative approach:
- Identify the larger of the two numbers (
max). - Start checking from
max. - Check if the current value is divisible by both numbers.
- If not, increment by
max(checkmax * 2,max * 3, etc.) and repeat.
Input: 7 and 4
- Check 7: Not divisible by 4.
- Check 14: Not divisible by 4.
- Check 21: Not divisible by 4.
-
Check 28: Divisible by both 7 and 4!
$\to$ Result: 28
--- EKOK Hesaplama ---
Sayilar: 7 ve 4
Sonuc : 28