the logic i have used is nCr => n!/(r!*(n-r)!)
for example the outer loop counter is 'n' and the inner loop counter is 'r' , then the corresponding element of the pascal's triangle will be...
The triangular array of binomial coefficients (triangle) was discussed by Persian Mathematician Al-Karaji (953-1029) and later invented and implemented by Persian Mathematician/Astronomer/Poet Omar...