My solution in c++ for 2^24

#include < iostream >
#include < cmath >

using namespace std;

int main() {

int base = 2;
int power = 24;
int answer = pow(base,power);

cout << "The number 2 to the power of 24 is  " << answer << "." << endl;

return 0;

}

The output is:

The square of 24 is 16777216.

Privacy & Terms