Recently I found the risk when using st like this:
int i = 10;
int sum = 0;
while ( i-- ){
sum = sum + i;
It actually get sum = 9 + 8 + 7 + .. + 1. So it lacks 10 in total. But I prefer this way of coding, it's fast and professional. Is there any advice to prevent from the risk and still have concise code?