cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Formula Help Needed
Formula Help Needed
Feb 6, 2012 at 8:23pm UTC
cpprookies
(1)
How can I express this formula in c++?
Amount = Principal*(1+r/n)^((n*t))
Thanks in advance.
Feb 6, 2012 at 8:26pm UTC
hamsterman
(4538)
For exponentiation, use
http://cplusplus.com/reference/clibrary/cmath/pow/
I don't see what else could be the problem.
Feb 6, 2012 at 8:29pm UTC
MrHutch
(1822)
Providing you named them as variables, what you've typed is perfectly valid C++ syntax (with the exception of a lacking terminating character).
Topic archived. No new replies allowed.