Results 1 to 2 of 2

Thread: > Math in C++ > Power

  1. #1

    Thread Starter
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    Arrow > Math in C++ > Power

    > Math in C++ > Power

    >>> Does anyone know how to get the Nth power of the variable A? let's say N=15, A=15, then 15^15 is the answer.
    Anyone know how to do that in C++? In Win32 and in Console.,

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  2. #2
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Code:
    #include <cmath>
    using namespace std;
    
    // ...
    
    pow(x, y);
    Hope that helps
    Alcohol & calculus don't mix.
    Never drink & derive.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width