// demoChar.cpp
// Demonstrates the data type char
#include <iostream>
using namespace std;
int main()
{
// Announce purpose of program:
cout << "This program demonstrates the data type char." << endl;
// Input a character:
cout << "Enter a character:>";
char typed; // to be input from user
cin >> typed;
// Output the character and its ASCII value:
cout << "You typed: " << typed << endl;
cout << "The numeric value of its binary code is: "
<< (int) typed << endl;
return 0;
} // function main