In this exercise I had to ask the user for a positive number and display its factorial. The program had to continue running until the user indicated it to stop by answering “n” to the question “would you like to try again?”.
For this, I used if-else and a loop, both of which I have discussed in previous exercises (You can check it out specifically here!).
You can look at the code I made for this:
And how it runs:
3 thoughts on “Factorial calculator!”