+1 vote
25 views
Write a C++ program to find the factorial of a inputted number  Turbo c++ maharashtra board
in Programming by (5.4k points)
reopened by | 25 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 (5.4k points)
selected by
500 questions
477 answers
8 comments
12 users