factorial in c++

Discussion in 'C++' started by want_somehelp, Feb 4, 2008.

  1. want_somehelp

    want_somehelp New Member

    Joined:
    Feb 4, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    hello friends iam not able to get logic behind solving the question mentioned below,,,,i tried a lot using various books.....online tutorials but at the end just lost it......

    you ppl are kindly requested to provide me help in order to save my interest in programming.....

    ok the question is:

    Write a program in c++ to find the factorial of a given number.For doing this create a class factorial in which define two methods get_Number(int) and display_factorial for reading number and displaying factorial of the read number respectively.


    Hoping for a good response....

    Thanking you///
     
  2. technosavvy

    technosavvy New Member

    Joined:
    Jan 2, 2008
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    0
    question understood... :) so where do u have the problem...
     
  3. oogabooga

    oogabooga New Member

    Joined:
    Jan 9, 2008
    Messages:
    115
    Likes Received:
    11
    Trophy Points:
    0
    Googling "factorial program in C++" or some such thing would lead to many prewritten programs if that is what you are looking for.

    If you are wishing to write it yourself, good for you!
    Have you written a program before in C++? In any other language?
    Do you know what a factorial is?
    Do you know what a "loop" is? A class? A variable? A method (function)?

    Post what you have so far. If you have nothing yet, describe the problem.
     

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