Finished program 5
This commit is contained in:
parent
98b720fdac
commit
ac11f56278
2 changed files with 29 additions and 0 deletions
15
final_lang/programas/programa5.fort
Normal file
15
final_lang/programas/programa5.fort
Normal file
|
|
@ -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
|
||||
14
final_lang/programas/programa5.fort.out
Normal file
14
final_lang/programas/programa5.fort.out
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue