Ask your own question, for FREE!
Computer Science 14 Online
OpenStudy (anonymous):

C++ Program to Find LCM of two numbers?

OpenStudy (anonymous):

Do you want to write one from scratch or would you be happy with something like that? http://live.boost.org/doc/libs/1_34_1/doc/html/boost_math/gcd_lcm.html#boost_math.gcd_lcm.lcm_function_object

OpenStudy (anonymous):

Could try this as well: for(n=a;n%b != 0;n+=a); return n;

OpenStudy (anonymous):

@shubhamsrg

OpenStudy (shubhamsrg):

cin>>a>>b; find out which one is greater by any legit method. lets say b is greater.. now ,, for(int i=1 ; i>= b ; i++) if( i% b ==0) if(i%a ==0) LCM = i;

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!