+1 vote
65 views
Write a C++ program to find the factorial of a inputted number  Turbo c++ maharashtra board
in Programming by Expert (10.7k points)
reopened by | 65 views

1 Answer

+1 vote
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++
by Expert (10.7k points)
selected by
714 questions
695 answers
11 comments
24 users