Wednesday, January 9, 2008

Multipling a number by 7 without using * or + operator.

iNumIntoSeven = iNum <<3 ; //Equivalent to multiplying by 8.
iNumIntoSeven = iNumIntoSeven - iNum;

Complexity: SIMPLE.

No comments: