Thread: Raising to a power

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    16

    Question Raising to a power

    In C++ how do you raise to a power? How would I enter this instruction P = Ar/ 1 - (1+r) to the n power?

  2. #2
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    You can use the pow(double, double) function in <cmath> (with the std namespace) to raise the first number entered to the power of the second.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with checking, raising to the power of 2
    By philippe in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 07:30 PM
  2. Replies: 6
    Last Post: 11-08-2005, 03:05 PM
  3. Problem With My Box
    By HaVoX in forum Tech Board
    Replies: 9
    Last Post: 10-15-2005, 07:38 AM
  4. raising to a power
    By next_to_nothing in forum C++ Programming
    Replies: 5
    Last Post: 10-22-2002, 04:00 AM