PROGRAM khayam
IMPLICIT NONE
INTEGER::n,i,t1,t2,t3,j1,j2,j3
INTEGER,ALLOCATABLE::a(:)
PRINT*," n ra vared konid : "
READ*,n
PRINT*
ALLOCATE (a(n+1))
t1=1
DO j1=1,n
t1=t1*j1
END DO
DO i=0,n
t3=1
t2=1
DO j2=1,i
t2=t2*j2
END DO
DO j3=1,n-i
t3=t3*j3
END DO
a(i+1)=t1/(t2*t3)
END DO
PRINT*,"zarayeb baraye tavan",n," : ",a
PRINT*
END