The wsq08 is about to do a program that calculates the factorial number of a number given by the user, and then ask the user if he wants to calculate another factorial.

A link to wth is a factorial

So the code was pretty easy, I just used, as usual, a while loop where a variable was multiplied by a counter, like 1 times one, then the result times two, then the result times 3 and so on.

In order to allow the user to start over, I put all the coede inside a loop with the condition that c==”y”; worth  saying that at the end of the program it asks the user to type   y   if he wants to keep using the app.

Github code

Serioulsy, this was easy 😀

CC BY 4.0 WSQ 09: Factorial by charliegdrummer is licensed under a Creative Commons Attribution 4.0 International License.