Solved

Exponents in C++

Posted on 2000-02-17
2
1,838 Views
Last Modified: 2010-05-18
How do you set an exponent to a number in C++?  
0
Comment
Question by:SBuntin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Beginner to Unreal Engine 4 5 104
DCT of  2D array using fftw in c++ 9 90
C++ help/ Toy problem 19 50
How to increment counter variables in ANSI  C (Not C# or C++). 9 39
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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

740 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