Microsoft interview question

Optimize the following C code to decrease the overall O value