cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
How do I implament powers in a progra
How do I implament powers in a progra
Jun 8, 2013 at 10:56am UTC
piczim
(63)
I am wanting to learn how to implement a program using powers. Example 2^3=8
many thanks
Rodney
Jun 8, 2013 at 11:12am UTC
Chervil
(7320)
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.