Anybody please give me programm to find factorial of an integer

Discussion in 'C' started by unni krishnan.r, May 30, 2010.

  1. unni krishnan.r

    unni krishnan.r Member

    Joined:
    Apr 20, 2010
    Messages:
    206
    Likes Received:
    3
    Trophy Points:
    18
    Occupation:
    education
    Location:
    Kerala
    Home Page:
    http://blogofunni.blogspot.com
    Anybody please give me programm to find factorial of an integer Please help me
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,352
    Likes Received:
    382
    Trophy Points:
    83
    Have you done anything?
     
  3. ajit_pimg

    ajit_pimg New Member

    Joined:
    Mar 31, 2010
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Home Page:
    http://www.richinfotech.blogspot.com
    visit this site
     
  4. virxen

    virxen Active Member

    Joined:
    Nov 24, 2009
    Messages:
    387
    Likes Received:
    90
    Trophy Points:
    28
    Code:
    long int factorial(int n)
     {
      if (n<=1)
        return(1);
      else
        n=n*factorial(n-1);
        return(n);
     }
    
     
    unni krishnan.r likes this.
  5. unni krishnan.r

    unni krishnan.r Member

    Joined:
    Apr 20, 2010
    Messages:
    206
    Likes Received:
    3
    Trophy Points:
    18
    Occupation:
    education
    Location:
    Kerala
    Home Page:
    http://blogofunni.blogspot.com
    Studing not as expert as you
    and
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice