#include #include //for the iomanipulator setw #include using namespace std; int main() { //Start with the number 1 //(in binary, that's 00000000000000000000000000000001), //and keep doubling it by left-shifting it. for (int i {0}; i < 31; ++i) { const int shifted {1 << i}; cout << setw(2) << i << " " << setw(10) << shifted << "\n"; } return EXIT_SUCCESS; }