#include #include //for the i/o manipulator setprecision #include #include //for the pow function #include //for class numeric_limits using namespace std; int main() { const size_t bytes {sizeof (int)}; const size_t bits {8 * bytes}; cout << "An int occupies " << bytes << " bytes, or " << bits << " bits on this machine.\n" << "That means that an int can hold one of " << fixed << setprecision(0) << pow(2, bits) << " different values.\n" << "These values range from " << numeric_limits::min() << " to " << numeric_limits::max() << " inclusive.\n\n"; cout << "An unsigned int occupies the same number of bytes as an int.\n" << "That means that an unsigned int can hold one of " << fixed << setprecision(0) << pow(2, bits) << " different values.\n" << "But these values range from " << numeric_limits::min() << " to " << numeric_limits::max() << " inclusive.\n"; return EXIT_SUCCESS; }