Please read the guide .
Please answer the question in detail
#include <iostream>
#include <conio.h>
using namespace std;
void fact(int num);
int main(void)
{
int num;
cout<<"Enter the number to find factorial\n";
cin>>num;
fact(num);
getch();
return 0;
}
void fact(int num)
int i,f=1;
for(i=1; i<=num; i++)
f=f*i;
cout<<"Factorial of "<<num<<"is:"<<f;
Output::
Doubtly is an online community for engineering students, offering:
Get the pro version for free by logging in!
5.7k questions
5.1k answers
108 comments
554 users