Language: C++

/* Jai Shree Ram
ॐ नमो भगवते वासुदेवाय नमः*/

#include <bits/stdc++.h>
#define endl "\n"
#define FIXED_FLOAT(x,pres) std::fixed <<std::setprecision(pres)<<(x)
#define pb push_back
#define all(a) a.begin(),a.end()
using namespace std;
#define INF 1e9 + 7
typedef long long ll;

template <typename T>
class Range {
  public:
    Range(const T& start, const T& stop, const T& step) : start_{start}, stop_{stop}, step_{step} {
        if (step_ == 0) {
            throw std::invalid_argument("Range step argument must not be zero");
        } else {
            if ((start_ > stop_ && step_ > 0) || (start_ < stop_ && step_ < 0)) {
                throw std::invalid_argument("Range arguments must result in termination");
            }
        }
    }
    
    class iterator {
      public:
        typedef std::forward_iterator_tag iterator_category;
        typedef T value_type;
        typedef T& reference;
        typedef T* pointer;

        iterator(value_type value, value_type step, value_type boundary) : value_{value}, step_{step},
                                                                           boundary_{boundary},
                                                                           positive_step_(step_ > 0) {}
        iterator operator++() { value_ += step_; return *this; }
        reference operator*() { return value_; }
        const pointer operator->() { return &value_; }
        bool operator==(const iterator& rhs) { return positive_step_ ? (value_ >= rhs.value_ && value_ > boundary_)
                                                                     : (value_ <= rhs.value_ && value_ < boundary_); }
        bool operator!=(const iterator& rhs) { return positive_step_ ? (value_ < rhs.value_ && value_ >= boundary_)
                                                                     : (value_ > rhs.value_ && value_ <= boundary_); }
        
      private:
        value_type value_;
        const T step_;
        const T boundary_;
        const bool positive_step_;
    };
    
    iterator begin() const {
        return iterator(start_, step_, start_);
    }
    
    iterator end() const {
        return iterator(stop_, step_, start_);
    }
  
  private:
    const T start_;
    const T stop_;
    const T step_;
};

template <typename T>
Range<T> range(const T& stop) {
    return Range<T>(T{0}, stop, T{1});
}

template <typename T>
Range<T> range(const T& start, const T& stop) {
    return Range<T>(start, stop, T{1});
}

template <typename T>
Range<T> range(const T& start, const T& stop, const T& step) {
    return Range<T>(start, stop, step);
}
/*-----------------------------------------------------------------------------*/

/*-----------------------------------------------------------------------------*/
void solve(){
    ll n;
    cin >> n;
    if(n < 2) cout << 0;
    else{
        ll ans = 1;
        for(auto i : range((ll)1,n-1,(ll)1)) ans *= i;
        cout << ans%INF;
    }
}

int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int t=1;
    // cin>>t;
    while(t--){
        solve();
        // cout<< endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:89:20: error: invalid operands of types 'll' {aka 'long long int'} and 'double' to binary 'operator%'
   89 |         cout << ans%INF;
      |                 ~~~^
      |                 |
      |                 ll {aka long long int}