Efficient way to multiply with 7 We can multiply a number by 7 using bitwise operator. First left shift the number by 3 bits (you will get 8n) then subtract the original numberfrom the shifted number and return the difference (8n – n). Program: # include
Read full article from Efficient way to multiply with 7 | GeeksforGeeks
No comments:
Post a Comment