#include #include #include #include #include using namespace std; template string int2binary(T num); #include "lab05.cpp" int main() { vector c{CHAR_MIN, -1, 0, 1, CHAR_MAX}; vector s{SHRT_MIN, -1, 0, 1, SHRT_MAX}; vector i{INT_MIN, -1, 0, 1, INT_MAX}; vector l{LONG_MIN, -1, 0, 1, LONG_MAX}; int width = to_string(CHAR_MIN).length(); for (auto i : c) cout << setw(width) << static_cast(i) << " = " << int2binary(i) << endl; width = to_string(SHRT_MIN).length(); for (auto i : s) cout << setw(width) << i << " = " << int2binary(i) << endl; width = to_string(INT_MIN).length(); for (auto j : i) cout << setw(width) << j << " = " << int2binary(j) << endl; width = to_string(LONG_MIN).length(); for (auto i : l) cout << setw(width) << i << " = " << int2binary(i) << endl; return 0; }