Given three numbers n, r and p, compute the value of nCr%p. Here p is a prime number greater than…
We are given three integers n, r, and p, we have to find the value of nCr%p. Here p is…