Goldman Sachs Interview Question

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