int isxdigit(int iChar);
#include <iostream>
#include <cctype>
int main() {
using namespace std;
// Output the column headings
cout << " ";
for (int iIndex = 0; iIndex < 16; ++iIndex) {
if (iIndex < 10) {
cout << " ";
}
cout << " " << iIndex;
}
cout << endl << endl;
for (int iIndex = 0; iIndex < 256; ++iIndex) {
// Output the row heading every 16 places
if ((iIndex) % 16 == 0) {
if (iIndex < 10) {
cout << " ";
} else if (iIndex < 100) {
cout << " ";
}
cout << iIndex << " ";
}
cout << " " << (bool)isxdigit(iIndex);
// Add an endline every 16 characters
if ((iIndex) % 16 == 15) {
cout << endl;
}
}
return 0;
}
© 20072025 XoaX.net LLC. All rights reserved.