How do I implament powers in a progra

I am wanting to learn how to implement a program using powers. Example 2^3=8

many thanks

Rodney
2^3 = 2*2*2
Either use a loop for repeated multiplication, or use the built in pow() function.
http://www.cplusplus.com/reference/cmath/pow/
Topic archived. No new replies allowed.