Sep 5, 2013 at 8:26pm UTC
I'm making a program for my class and I'm completely lost on how to enter the exponential growth function into code blocks can anyone help me, the equation is:
X=a(1+b)^t
Last edited on Sep 5, 2013 at 8:29pm UTC
Sep 5, 2013 at 8:32pm UTC
x = a*pow(1+b,t);
You need to include <cmath> header
Last edited on Sep 5, 2013 at 8:32pm UTC
Sep 6, 2013 at 12:42pm UTC
The header I have to use is #include <math.h> is that still the correct format for the equation
Last edited on Sep 6, 2013 at 1:35pm UTC
Sep 6, 2013 at 1:01pm UTC
Yes <math.h> is for the old c <cmath> is the new notation for c++ ,As you probably knew c++ include c ,thus It is fine with old/new notations