0
Can anyone explain me what is the use of return ??? What is the difference between return 0 return 1 return 4*factor(n-1)
what is this all ??? is there any use of using return instead of return to main main ?????
2 Respuestas
+ 1
Functions work kinda like in math: You put something in, the function does it's magic and you get a result. Consider the simple linear function y=mx+n. For every x you put into this function you will get a y out of it. That's the same with C++: double y(double x) {return 2*x+1;}
- 2
return 0 means false 1 means true