Answer:
x = input('Enter order of pascal matrix to be formed'); // Dynamically read the order of pascal matrix to be formed
for i=1:x // loop for x number of rows
for j=1:x // loop for x number of colums
M(i,j) = factorial(i+j-2) / (factorial(i-1) * factorial(j-1)); // logic to computer the elements of matrix
end
end
M // print the matrix