.
PROGRAM fibo
IMPLICIT NONE
INTEGER::f1,f2,f3,i,n
INTEGER,ALLOCATABLE::a(:)
READ*,n
ALLOCATE (a(n))
PRINT*
f1=1
f2=1
a(1)=f1
a(2)=f2
DO i=3,n
f3=f2+f1
a(i)=f3
f1=f2
f2=f3
END DO
PRINT*,a
END
PROGRAM fibo
IMPLICIT NONE
INTEGER::f1,f2,f3,i,n
INTEGER,ALLOCATABLE::a(:)
READ*,n
ALLOCATE (a(n))
PRINT*
f1=1
f2=1
a(1)=f1
a(2)=f2
DO i=3,n
f3=f2+f1
a(i)=f3
f1=f2
f2=f3
END DO
PRINT*,a
END