Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Welcome to Code Forum!
Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.
Hi, I have made changes to my code according to your suggestions. One thing I am wondering is my function needs to return an int because this is how I declare it before the function name but you mentioned using unsigned long which I added as a local variable which means I have different types...
My factorial program does not give me the correct results in cases, for instance 13 should be 6227020800 and my output is 1932053504. I display my C program below, is someone able to help me fix it for these cases? I know the formula for factorial is n × (n - 1).
int factorial(int nb)
{...