How to enter this equation

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
closed account (28poGNh0)
x = a*pow(1+b,t);

You need to include <cmath> header
Last edited on
The header I have to use is #include <math.h> is that still the correct format for the equation

Last edited on
closed account (28poGNh0)
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
Topic archived. No new replies allowed.