Why does the 1st Return statement will return value to the function in stack? and why the last return statement returns the results to Main?

return statement in if block returns its value to the Pfact() but last return statement is returned to main… why?

@discobot Consider how stack memory works and you will get your answer.

Hi! To find out what I can do, say @discobot display help.

@discobot display help

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.