ascii - cin>> inputChar Display the input with its...

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 >> inputChar; // Display the input with its ASCII code using typecasting cout << inputChar << "'s ASCII code is " << int(inputChar) << endl; return 0; }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online