Goldman Sachs interview question

write algorithm of n^k without using '**'