You are viewing a single comment's thread. Return to all comments →
You must cast before you do mulitiplication, not after.
Withe long vol = l*b*h, the multiplication is done with int, and the result in int is then cast to long.
long vol = l*b*h
Seems like cookies are disabled on this browser, please enable them to open this website
Box It!
You are viewing a single comment's thread. Return to all comments →
You must cast before you do mulitiplication, not after.
Withe
long vol = l*b*h
, the multiplication is done with int, and the result in int is then cast to long.