In this blog let us see a simple program to find factorial of any number 'n'
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUFWzYcscvqDfS7vPwUCH83knMaXmpTYBs_pYigq3uLwYWHFWOCfwpTAo4BotqNuJix2oA8O5jnJuhwm7XzdSEMiBPi0W2infJutwpWNHIWfWdWIwcfGcC8ct5R6qxXUJRfdub7QZkZj8-/s320/del.png)
In this we have a function to find the factorial and return it to the main() function from where the function fact() is called.
The output of the above program will be as follows:
For any c++ code ask me in the comments below.
I will code and give you the answer, thus making your homework easy.
No comments:
Post a Comment