RosettaCodeData/Task/Look-and-say-sequence/Fortran/look-and-say-sequence-2.f
2023-07-01 13:44:08 -04:00

17 lines
288 B
Forth

program LookAndSayTest
use LookAndSay
implicit none
integer :: i
character(len=200) :: t, r
t = "1"
print *,trim(t)
call look_and_say(t, r)
print *, trim(r)
do i = 1, 10
call look_and_say(r, t)
r = t
print *, trim(r)
end do
end program LookAndSayTest