posted 13 years ago
For the above code segment, I have not initialized the variable thePrice. The if statement will always be true here in this case and thePrice will be initialized to be weight*10. However, this would not work unless i take away the if statement. Can anyone tell me why?
Thanks