| | |
LCM & HCF of 2 nos
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
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.
Consider 2 numbers a and b and a > b.
C Syntax (Toggle Plain Text)
function hcf { if (a%b)==0 return b else hcf(b,a%b) } 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
![]() |
Other Threads in the C Forum
- Previous Thread: Remove characters from string C
- Next Thread: Change char to int and store in an array
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays bash binarysearch centimeter char convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory drawing dynamic executable fflush file floatingpointvalidation fork frequency getlasterror getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling hardware highest homework i/o ide inches infiniteloop initialization interest kilometer lazy linked linkedlist linux linuxsegmentationfault list logical_drives match matrix meter microsoft motherboard multi mysql odf open opendocumentformat openwebfoundation pattern pause pdf pointer pointers posix power problem program programming pyramidusingturboccodes read recursion recv repetition scanf scheduling segmentationfault send shape single socketprograming socketprogramming spoonfeeding stack standard strchr string strings structures student suggestions system test testautomation unix urboc user voidmain() win32api windows.h






