➽ Program:-
#include<iostream>
using namespace std;
int main()
{
int i, num,
fact=1;
cout<<"Enter a Number: ";
cin>>num;
for(i=1; i<=num;
i++)
{
Fact = fact * i;
}
cout<<"Factorial of " << num << " is "
<< Fact;
return 0;
}
➽ Output:-
Enter a Number: 8
Factorial of 8 is 40320
0 Comments
Please do not enter any spam link in the comment section.