For this Question: In a pascal triangle starting from top to bottom. Find the value of the element in a given row and column position i.e. ith row and at jth position.The first line of input contains an integer T denoting the number of test cases. Each test case will have two integers indexes of the ith row and jth column provided in the new line.

Constraints:
1 <= T <= 100
0 <= j <= i <= 500
Print the answer for each testcase in separated line. Since the output can be very large, mod your output by 10^9+7.Input:
2
0 0 
2 1

Output:
1
2
Explanation: The Pascal Triangle has first value as 1. (0th row 0th element). The pascal triangle has next set of values as 1 1. (1th row). On the next level, pascal triangle has values 1 2 1. (2nd row). Its 1st element is 2. (0 based)., I have written this Solution Code: #include <bits/stdc++.h>

using namespace std;
int modInverse(long long  a, long long m)
{
    long  m0 = m;
    long  y = 0, x = 1;

    while (a > 1)
    {
        int q = a / m;
        int t = m;


        m = a % m, a = t;
        t = y;

        y = x - q * y;
        x = t;
    }

    if (x < 0)
       x += m0;

    return x;
}


int main()
{
long long mod=1000000007;
    int t;
    cin>>t;
    while(t--){
        int i,j;
        cin>>i>>j;
        i++;j++;
            long long C=1;
            long long x=1;
    for (int p = 1; p < j; p++)
    {
        C = C * (i - p);
        x=x*p;
        C=C%mod;
        x=x%mod;
    }
    C=C*modInverse(x,mod);
    C=C%mod;

    cout<<C<<endl;
}


}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?