Write a program to find the factorial of the given program

//This a program to find the factorial of the given program
#include<iostream>
#include<conio.h>

using namespace std;

int main()
{
int num,i;
long int fact=1;

cout<<"\n\nEnter the number: ";
cin>>num;

//finding the factorial
for(i=1;i<=num;i++)
fact=fact*i;

cout<<"\n\nThe factorial of the given number is "<<fact;

return 0;

}

Previous
Next Post »