ascii - cin >> inputChar; // Display...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// Char --> ASCII conversion program / #include <iostream> using namespace std; u int main() { char inputChar; // input character // Prompt for an input character cout << "Type a character: ";
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cin &gt;&gt; inputChar; // Display the input with its ASCII code using typecasting cout &lt;&lt; inputChar &lt;&lt; &quot;'s ASCII code is &quot; &lt;&lt; int(inputChar) &lt;&lt; endl; return 0; }...
View Full Document

Ask a homework question - tutors are online