Find smallest values of x and y such that ax | To find GCD using Eculcid 's algorithm ; Prints smallest values of x and y that satisfy " ax ▁ - ▁ by ▁ = ▁ 0" ; Find LCM ; Driver Code
< ? php function gcd ( $ a , $ b ) { if ( $ b == 0 ) return $ a ; return ( gcd ( $ b , $ a % $ b ) ) ; } function findSmallest ( $ a , $ b ) { $ lcm = ( $ a * $ b ) / gcd ( $ a , $ b ) ; echo " x ▁ = ▁ " , $ lcm / $ a , " y = " } $ a = 25 ; $ b = 35 ; findSmallest ( $ a , $ b ) ; ? >