RosettaCodeData/Task/Look-and-say-sequence/Fortran/look-and-say-sequence-2.f
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07: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