Question d’entretien chez Goldman Sachs

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