Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- typedef long long ll;
- typedef unsigned long long ull;
- typedef double dl;
- dl Factorial(ll n) {
- if (n - 1) {
- return (n * Factorial(n - 1));
- }
- else {
- return 1;
- }
- }
- int main() {
- ios_base::sync_with_stdio(0);
- cin.tie(0);
- ll x;
- cin >> x;
- ll ans;
- ans = Factorial(x);
- cout << ans;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement