Solved

Exponents in C++

Posted on 2000-02-17
2
1,828 Views
Last Modified: 2010-05-18
How do you set an exponent to a number in C++?  
0
Comment
Question by:SBuntin
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 50 total points
ID: 2532446
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
 

Expert Comment

by:Stevex2
ID: 2532465
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

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now