You're substracting one from the variable "exponent" with every iteration of the loop, and you told it to break out of the loop once "exponent" is 0, therefore, it's always going to end up as 0 at the end.
If you want to keep the input from the user, then declare another variable like "counter" and assign the value of "exponent" to it and use it for the loop
Or even better, do this for the loop:
for(int i = 0; i < exponent; i++)
{
//Code here
}