Created
July 26, 2018 00:15
-
-
Save ioxua/628a888b43a10594615895f89a81a780 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(This is an example of a recursive factorial in Rockstar.) | |
(File extention is obviously made up.) | |
(I have put these wildcard variable names so you can come up...) | |
(...with your own creative names ;)) | |
(I have just realized Rockstar has no multiline comments. Oops) | |
Factorial takes $NUM and $RES | |
If $NUM is smaller than $TWO | |
Give back $RES | |
$NNUM is $NUM minus $ONE | |
$NRES is $RES times $NUM | |
Put $NRES minus $ONE into $NRES | |
Give back Factorial taking $NNUM, $NRES |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment