How would I use a for loop when I need to write code that will compute the result of an int raised to the power of another int? Does that mean I'd have to make a separate base variable and an exponent variable initialized within the for loop?
For example, using a for loop I'll have to output the result of an int raised to the power of another int. So base variable x = 2, exponent variable = 2, so the output would be for. How would I do this using a for loop?
Then inside your for loop, use the exponent value to limit the amount of times it loops whilst multiply the variable by itself to calculate the result.