Skip to content
doubtly

1 answer

Best answer

#include<iostream.h>
#include<conio.h>
void main()
{
 int i,n;
 long int fact;
  clrscr();
 cout<<"Enter the number to find the Factorial"<<endl;
 cin>>n;
 fact=1;
 for (i=1;i<=n;i++)
 {
fact=fact*i;
 }
  cout<<"The Factorial of the given number is "<<fact<<endl;
 getch();
 }
for turbo C++
Doubtly · 1 May 2021 Report
Was this answer helpful?

Your answer

Log in or create a free account to answer this question.