Find the HCF and LCM of 2 nos using C Programming?

Recommended Answers

All 5 Replies

yes.

yes you can.

What is a "nos"?

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.

commented: Well it certainly "smells" like homework, so noses seems a likely bet ;) +30

You should really watch the Fast and the Furious, then you would have known: Nitrous Oxide Systems

Consider 2 numbers a and b and a > b.

function hcf
{
if (a%b)==0
return b
else
hcf(b,a%b)
}
lcm = (product of 2 numbers)/hcf
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.