Can anybody help with this code because it's not given no output

Factorial code I have made some changes but output is given "no output" please anybody help me in this.....

3/20/2019 4:54:26 AM

Anil Gupta

7 Answers

New Answer


So here is your code: https://code.sololearn.com/cVHeZQq2lmEc/?ref=app The problem is that you forgot to use & (Address Operator) in the scanf() function Change line no. 9 to this: scanf("%d", &x); And your code will be fine! Note that using & Operator is must while scanning value from user in C Language, otherwise that value will freely move in the memory and will not be stored in the proper variable.


Anil Gupta No you have not used address operator. Check this: scanf(" %d", *x*); Change *x* to *&x*


Anil Gupta Check mark my main answer if that helped you


Show us your code. We can’t help you if we can’t see what youve done




But I have already address operator in scanf but still given same output that "no output "


Absolutely right I have forgotten to add that thank you so much