A community for students.
Here's the question you clicked on:
 0 viewing
anonymous
 3 years ago
C++ Program to Find LCM of two numbers?
anonymous
 3 years ago
C++ Program to Find LCM of two numbers?

This Question is Closed

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.0Do 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

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.0Could try this as well: for(n=a;n%b != 0;n+=a); return n;

shubhamsrg
 3 years ago
Best ResponseYou've already chosen the best response.0cin>>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;
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.