In this program, we will learn how to find factorial of a given number using C++ program? Here, we will implement this program with and without using user define function.
using namespace std;
long int fact=1;
cout<<"Enter an integer number: ";
cout<<"Factorial of "<<num<<" is = "<<fact<<endl;
Enter an integer number: 6
Factorial of 6 is = 720
total answers (1)
start bookmarking useful questions and collections and save it into your
own study-lists, login now to start creating your own collections.