Pow()

Discussion in 'C++' started by jmwalker, Sep 20, 2006.

  1. jmwalker

    jmwalker New Member

    Joined:
    Sep 20, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    My question is how would you write a pow statement for example account = interest(1/r)r?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Prototype: double pow(double b, double p);
    Header File: math.h (C) or cmath (C++)
    Explanation: This function raises b to the p power.
    example: cout<<"4 to the 5th power is: "<<pow(4, 5);
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice