// digitASCII.cpp
// Displays a table of the digit characters
// and their ASCII code values.

#include <iostream>

int main()
{
   // Display table headings:
   cout << "  digit     ASCII code" << endl;
   cout << "  value       value" << endl << endl;

   // Display table body:
   for ( char digitChar = '0'; digitChar <= '9'; digitChar++ )
      cout << "    " << digitChar << "           "
                     << (int) digitChar << endl;
   return 0;
}  // function main