[function exp(k, n)
{
power := 1;
for i := 1 to n do
power := power * k;
return(power)
}]

So, what is the problem? Why can't you do it? What do you think the answer is?

Do you think you'll just get answers just by posting questions? We don't do people's homework here.

If you need help, explain what ideas you might have about what the solution would be.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.