! Program to find the fibonacci series whose last term does not exceed the desired limit
write(*,*)'Enter the desired limit:'
read(*,*)n
print*,'The fibonacci series whose last term is not greater than',n,' is:'
i=1
j=1
do while (i.lt.n)
write(*,*)i
k=i+j
i=j
j=k
end do
end
write(*,*)'Enter the desired limit:'
read(*,*)n
print*,'The fibonacci series whose last term is not greater than',n,' is:'
i=1
j=1
do while (i.lt.n)
write(*,*)i
k=i+j
i=j
j=k
end do
end
Comments
Post a Comment