What exactly does the "Return 0;" indicate in this function?
I know my code will not even compile without it, but I have just been putting it in out of habit without realizing that I do not even know what it does. I was under the assumption that it meant this particular function returned a value of 0, or contained no parameters, but in this case that does not make sense to me.
Can somebody help me out?
if (store <1 || store >3) //if store number is not 1, 2 or 3
{
printf("\nPlease enter 1,2 or 3\n");
printf("\n\tINVALID NUMBER ENTERED! Would you like to try again? (y/n) ");//allows retry
scanf("%c", &cAgain); //scans input at INVALID prompt
if (cAgain == 'y' || cAgain == 'Y')//repeats calculator
{
goto YES; //back to top
}
else if (cAgain == 'n' || cAgain == 'N')//end
return 0;
}