diff --git a/final_lang/programas/programa5.fort b/final_lang/programas/programa5.fort new file mode 100644 index 0000000..ef7a63b --- /dev/null +++ b/final_lang/programas/programa5.fort @@ -0,0 +1,15 @@ +program p5 +integer :: counter, limit +subroutine printUntilLimit + if (counter <= limit) then + print counter, ' ' + counter = counter + 1 + printUntilLimit() + end if +end subroutine +print 'Enter the limit number: ' +read limit +counter = 0 +printUntilLimit() +print endline +end program \ No newline at end of file diff --git a/final_lang/programas/programa5.fort.out b/final_lang/programas/programa5.fort.out new file mode 100644 index 0000000..3f5f6ab --- /dev/null +++ b/final_lang/programas/programa5.fort.out @@ -0,0 +1,14 @@ +goto 10 +<= $200 $201 $0 +gotoF $0 9 +print $200 +print ' ' ++ $200 1 $0 += $0 $200 +call 2 +goback +print 'Enter the limit number: ' +read $201 += 0 $200 +call 2 +print endline