I tried to find my question but i didn't so i will open this subject. What the return 0
does in a function? Like:
double moneyBonus(double money)
{
if (money >= 0 && money <= 1000)
{
return money * (3.0/100.0);
}
return 0.0; // same results if i remove it
}
Thanks in advance! EDIT: it says that question is duplicate, i tried to understand the other post but i didn't understand it so i made mine. I don't know how this duplicate think works!