A Nintendo Switch homebrew to calculate the factorial of a number.
Because 2^63 is the highest number the switch supports, you can't go over 25 factorial.
Note that I made this Homebrew only to learn how to use the basics of libnx and isn't really useful.
To make things easier, let's just say that the number you want to factor is called Jeffrey
- a to add 1 to Jeffrey
- b to subtract 1 from Jeffrey
- x or y to set Jeffrey to 0
- any trigger (r/l/zr/zl) to clear the terminal
- Minus (-) to factor Jeffrey
- Plus (+) to exit the Homebrew
- Everything else will show you the 'help' menu
The letter shown before the value of the number is what executed the action :
- (A) means you added 1 by pressing A
- (B) means you substracted 1 by pressing B
- (X) or (Y) means you set the number to 0 by pressing X or Y
Feel free to copy and distribute it as much as you want without any legal restrictions.
Could be optimized but then the code would be very ugly.
App icon generated using Dall-E 2
Main look and operation :
What happens when you press A, B and X :
Help menu :