Exponents in C++

How do you set an exponent to a number in C++?  
SBuntinAsked:
Who is Participating?
 
jkrConnect With a Mentor Commented:
Did you look for

pow
Calculates x raised to the power of y.

double pow( double x, double y );


or


exp
Calculates the exponential.

double exp( double x );

(both in math.h)

I'm not sure which one you meant...
0
 
Stevex2Commented:
I believe its one of these two you are looking for


x^y

or

x MOD y

believe they are included in the math.h file.

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.