/* charcodes8.cpp to display the numeric codes of whatever characters 
 * the user enters, until the eof character is entered.
 *
 * Input:   a collection of characters
 * Output:  the (integer) numeric code of each character entered
 
***********************************************************************/

#include <iostream.h>                // <<, cout, cin, get, eof()

int main()
{
   cout << "This program displays the numeric codes of whatever\n"
           "characters you enter.  (Type the eof character to quit.)\n";

   char ch;
   for (;;)
   {
      cin.get(ch);

      if (cin.eof()) break;

      cout << '\t' << int(ch) << endl;
   }

   return 0;
}


