- World's Largest Collection of Interview Questions
Start Your Own website Now
Sponsored Links

Interview Questions
Our Services

Get 9,000 Interview Questions & Answers in an eBook.

  • 9500+ Pages
  • 9000 Question & Answers
  • All Tech. Categories
  • 14 MB Content

    Get it now !!

    Send your Resume to 6000 Companies

    Question :
    Write a program to find the L.C.M. and G.C.D.of two numbers?

    Posted by: surbhi on 9/9/2008

    Contact surbhi Contact surbhi
    Category HTML Interview Questions
    Rating (0.4) By 1825 users
    Added on 9/9/2008
    Views 21410
    Rate it!

    int gcd(int a, int b)
    if (a==0 && b==0) return -1;
    if (b==0) return a;
    return gcd(b,a%b);

    int lcm (int a, int b)
    return (int) (a*b)/gcd(a,b);

    Posted by: Nutan    

    Contact Nutan Contact Nutan




    int a, fact;

    printf(" Enter any number: ");

    scanf ("%d", &a);

    fact=rec (a);

    printf(" Factorial Value = %d", fact);


    rec (int x)


    int f;

    if (x==1)

    return (1);



    return (f);


    Posted by: abhijit halder    

    Contact abhijit halder Contact abhijit halder

    If you have the better answer, then send it to us. We will display your answer after the approval.
    Rules to Post Answers in

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

    Related Questions
    View Answer
    What is the difference between jscript and javascript?
    View Answer
    How can use MARQUEE in HTML?
    View Answer
    HTML is a Programming Language or Scripting Language?
    View Answer
    What?s the Vuser Generator?
    View Answer
    What is HTML?
    View Answer

    Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here - Best Freshers & Experienced Jobs Website.

    View ALL HTML Interview Questions

    User Options
    Sponsored Links

    Copyright ©2003-2015, All Rights Reserved.
    Privacy Policy | Terms and Conditions

    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Dedicated Servers | C Interview Questions & Answers

    Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes

    Cache = 0.03125 Seconds