1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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 New Member

    Joined:
    Apr 20, 2010
    Messages:
    204
    Likes Received:
    3
    Trophy Points:
    0
    Occupation:
    education
    Location:
    Kerala
    Home Page:
    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,285
    Likes Received:
    364
    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:
    visit this site
     
  4. virxen

    virxen New Member

    Joined:
    Nov 24, 2009
    Messages:
    387
    Likes Received:
    90
    Trophy Points:
    0
    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 New Member

    Joined:
    Apr 20, 2010
    Messages:
    204
    Likes Received:
    3
    Trophy Points:
    0
    Occupation:
    education
    Location:
    Kerala
    Home Page:
    Studing not as expert as you
    and
     

Share This Page