how do i 2 to the power of any exponent WITHOUT using the Math.pow method? :ehh:
Printable View
how do i 2 to the power of any exponent WITHOUT using the Math.pow method? :ehh:
A for loop, a recursive method, or a bit shifting operation can do it. Depends on what your instructor is expecting.
unsigned left shift would be the best way to go just FYI