....
using namespace std; int fact(int n){ int i,j=1; for(i=n;i>=1;i–){ j*=i; }
return (j);
}
int main() {int n; cin>>n; cout<<fact(n)<<endl; return 0;
} .....