recur_test2.f 251 B

123456789101112131415
  1. i = 1
  2. call count(i)
  3. stop
  4. end
  5. c-------------------------------------------
  6. recursive subroutine count(i)
  7. write(*,*) i
  8. i = i + 1
  9. if(i.le.10) then
  10. call count(i)
  11. endif
  12. return
  13. end