Thu May 30 2024 11:50:22 GMT+0000 (Coordinated Universal Time)
Saved by @anchal_llll
#include<bits/stdc++.h> using namespace std; int fact(int n) { int m=1; for(int i=1;i<=n;i++) { m=m*i; } return m; } int main() { int n; cin>>n; cout<<"Factorial of number is: "<<fact(n); return 0; }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments