program main implicit NONE integer:: a,b,c,lcm,i,j print*,"enter the two numbers" read*,a,b i=a j=b if(a<b) then c=a a=b b=c end if do c=mod(a,b) if(c==0) exit a=b b=c end do lcm=(i*j)/b print*,"the LCM is",lcm end program main
To embed this project on your website, copy the following code and paste it into your website's HTML: