12345678910111213141516171819
#include <iostream> int main() { using namespace std; cout << "Enter characters; enter # to quit: "; char ch; int count = 0; cin >> ch; while (ch != '#') { cout << ch; ++count; cin >> ch; } cout << endl << count << " characters read\n"; return 0; }
cin