Hi I have been at this for hours and cannot understand why the shipping keeps outputting the same amount no matter which weight I enter. It is supposed to calculate the shipping based on the weight and there are three different options like if it is over 45 pounds it will be a different amount. Can anyone tell me what I need to fix?
Last edited by lva28; TodCode:float CalcShip(int &totalAt) { float ship; ship=0.00; if (totalAt <= 15) { ship= 8.00; } else if (totalAt <= 40) { ship= (totalAt - 15) *.1 + 8.00; } else if (totalAt > 50) { ship= (totalAt - 45) *.07 + 8.00; } return (ship); }




Reply With Quote