LCM & HCF of 2 nos

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Feb 2009
Posts: 8
Reputation: BimanD is an unknown quantity at this point 
Solved Threads: 0
BimanD BimanD is offline Offline
Newbie Poster

LCM & HCF of 2 nos

 
0
  #1
May 6th, 2009
Find the HCF and LCM of 2 nos using C Programming?
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 1,669
Reputation: jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of 
Solved Threads: 123
jephthah's Avatar
jephthah jephthah is offline Offline
Posting Virtuoso

Re: LCM & HCF of 2 nos

 
0
  #2
May 7th, 2009
yes.

yes you can.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 977
Reputation: MosaicFuneral is just really nice MosaicFuneral is just really nice MosaicFuneral is just really nice MosaicFuneral is just really nice MosaicFuneral is just really nice 
Solved Threads: 92
MosaicFuneral's Avatar
MosaicFuneral MosaicFuneral is offline Offline
Posting Shark

Re: LCM & HCF of 2 nos

 
0
  #3
May 7th, 2009
What is a "nos"?
"Jedenfalls bin ich überzeugt, daß der Alte nicht würfelt."
"I became very sensitive to what will happen to all this and all of us." -Two geniuses named Albert
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 1,669
Reputation: jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of jephthah has much to be proud of 
Solved Threads: 123
jephthah's Avatar
jephthah jephthah is offline Offline
Posting Virtuoso

Re: LCM & HCF of 2 nos

 
1
  #4
May 7th, 2009
either a sloppy abbreviation for "numbers" (abbr. "no.")

or he's looking for the LCM and GCF of two noses.

on further review, i prefer the latter.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 2,972
Reputation: niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute niek_e has a reputation beyond repute 
Solved Threads: 308
Moderator
Featured Poster
niek_e's Avatar
niek_e niek_e is offline Offline
Cenosillicaphobiac

Re: LCM & HCF of 2 nos

 
0
  #5
May 7th, 2009
You should really watch the Fast and the Furious, then you would have known: Nitrous Oxide Systems
Last edited by niek_e; May 7th, 2009 at 5:54 am.
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 110
Reputation: s_sridhar has a little shameless behaviour in the past 
Solved Threads: 11
s_sridhar's Avatar
s_sridhar s_sridhar is offline Offline
Junior Poster

Re: LCM & HCF of 2 nos

 
0
  #6
May 7th, 2009
Consider 2 numbers a and b and a > b.
  1. function hcf
  2. {
  3. if (a%b)==0
  4. return b
  5. else
  6. hcf(b,a%b)
  7. }
  8. lcm = (product of 2 numbers)/hcf
Last edited by WaltP; May 7th, 2009 at 1:04 pm. Reason: Consider using CODE tag when posting code
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the C Forum
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC