fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n=5,i,fact = 1;
  6. for(i=1; i<=n; i++)
  7. {
  8. fact = fact * i;
  9. }
  10. cout<<"Factorial Number is :"<< fact<<endl;
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
Factorial Number is :120