It executes the correct number of times. The problem is with power=base*base. No mater how many times you execute that, if base is 5, base*base=25. I would change the code to start with power=1, and put power*=base;
Also, please use code tags.

While your way works, try and avoid using while loops in place of for loops. It's easier to follow for most people. Granted that's a style nitpick and people like doing things differently, but doesn't...

for (int i = 0; i < expo; i++)

...seem more definitive than a while loop? Plus you also save an insignificant amount of memory overall even if not during the loop.