int b=(a<<6)+(a<<5)+(a<<2);//умножить на 100 int c=(a<<10)-((a<<4)+(a<<3));//умножить на 1000 int d=(a<<3)+(a<<1);//умножить на 10
Tell me how to divide by 10,100,1000 any number of 'a'
with an offset (shift)? Integer int
(the remainder of the division is not important).
a/100
, the compiler will do everything in the best way. - Vladimir Gamalyan