This one was a bit interesting and funny. I wrote something similar in my C# course last semester, so I had the idea of the logic of the program. After trying for a while, it finally worked and it was amazing…but I still was having a problem… the main loop didn’t work :/ so the question of “Would you like to type another number?” was useless.
At first I thought I confused the order of the loops but that wasn’t the problem. My friend Christian saw my code and we were trying to figure it out what was the problem… and finally we discovered it……. I used the variable “answ” as int and not as char… hahaha here is some advice for everyone: Make sure you have declared right you variables so you won’t be having any problem as I had!
Here is a screenshot of code, also you can find it on GitHub if you want to download it and trying to make some changes, feel free. Link.
I recorded a video of my code working with Jing, that is an awesome app which allows you to record whatever you are doing on your computer… Here is the link of my code working via ScreenCast.
Alex H.
·Factorial calculator· #WSQ09 by alexhfoo is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.