PROGRAM ON FACTORIAL OF INTEGER

#include<iostream.h>
#include<conio.h>
void main()
{ int fact=1,i,n;
  clrscr();
  cout<<"Enter the no.";
  cin>>n;
  for(i=1;i<=n;i++)
  {  fact=fact*i;
  }
  cout<<"Factorial of no. is:"<<fact;
  getch();
}

Comments

Popular Posts