Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   factorial in c++ (http://www.go4expert.com/forums/factorial-in-cpp-t8643/)

want_somehelp 4Feb2008 15:30

factorial in c++
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///

technosavvy 4Feb2008 17:19

Re: factorial in c++
question understood... :) so where do u have the problem...

oogabooga 4Feb2008 22:28

Re: factorial in c++

Originally Posted by want_somehelp
Hoping for a good response...

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.

All times are GMT +5.5. The time now is 05:43.