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

factorial fuctions

Discussion in 'C++' started by kuchick32, Sep 12, 2010.

  1. kuchick32

    kuchick32 New Member

    Joined:
    Sep 12, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    One of my assignments is to write a factorial function. I have no clue how to start this program. HELP!!

    This is my assignment..

    Example Outputs
    Enter the number: 5
    The factorial of 5 is 120

    Enter the number: 0
    The factorial of 0 is 1

    Enter the number: -8
    Invalid Input


    how do i do this?
     
  2. techgeek.in

    techgeek.in New Member

    Joined:
    Dec 20, 2009
    Messages:
    572
    Likes Received:
    17
    Trophy Points:
    0
    Occupation:
    EOC (exploitation of computers)..i m a Terminator.
    Location:
    Not an alien!! for sure
    Home Page:
    I don't like people who doesn't do thr assignment themselves... Did you ever tried?? Do you have knowledge about recursion?? Ans me plzzzz....Doing a factorial program is not a big deal...you might have not gone thr recursion...Forget about recursion it can also be done using simple "for LOOP" only....
     

Share This Page