In C

In Java

In Assembler

Fun fact: fastest is still with temp variable. (:

Extra python:

Facebook comments:

comments