Function Big(a as integer,b as integer) as integer if b = 0 then Big = a else t = a mod b Big=Big(b, t) end if End Function Private Sub main() Dim x, y,small as Integer small = x * y / Big(x,y) End Sub
int gcd(int x,int y){ int temp; while(y!=0){ temp=x%y; x=y; y=temp; } return x; } int lcm(int a,int b){ return a*b/gcd(x,y); }