home *** CD-ROM | disk | FTP | other *** search
-
- 'this program computes a factorial for a keyboard entered
- 'number and displays the result
-
- input "Please enter a number>"; entry
-
- result = 1
-
- [recurringLoop]
-
- counter = counter + 1
- if counter > entry then [skip]
- result = result * counter
- gosub [recurringLoop]
-
- [skip]
-
- entry = entry - 1
- if entry = 1 then [end]
- return
-
- [end]
-
- print "The factorial is: "; result
-
-