Factorial Program

Description:

C++ Program to find Factorial of a number using class Test Case 1 Input (stdin) 4 Expected Output Factorial of 4 is : 24 Test Case 2 Input (stdin) 6 Expected Output Factorial of 6 is : 720

Program :

#include <iostream>

using namespace std;

int main()

{

int n,i,pro=1;

  cin>>n;

  for(i=1;i<=n;i++)

  {

  pro=pro*i;

  }

  cout<<"Factorial of "<<n<<" is : "<<pro;

return 0;

}