From ac11f5627832177a6ec86f24e51b3dbbf29f7f50 Mon Sep 17 00:00:00 2001 From: AYM1607 Date: Sat, 4 May 2019 23:33:10 -0500 Subject: [PATCH] Finished program 5 --- final_lang/programas/programa5.fort | 15 +++++++++++++++ final_lang/programas/programa5.fort.out | 14 ++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 final_lang/programas/programa5.fort create mode 100644 final_lang/programas/programa5.fort.out 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