In C++ using the standard math library.
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int result = pow(2, 24); // 2 to the 24th power
cout << result;
return 0;
}
JavaScript is so much tidier for this! 2^24
In C++ using the standard math library.
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int result = pow(2, 24); // 2 to the 24th power
cout << result;
return 0;
}
JavaScript is so much tidier for this! 2^24