#program to print pascal's triangle
import mathn_2=int(input("Enter the number of rows: "))
for i in range(n_2):
for j in range(n_2 - i):
print(" ", end="")
for j in range(i + 1):
print(math.factorial(i) // (math.factorial(j) * math.factorial(i - j)), end=" ")
Comments
Post a Comment