// count the number of any character input by the user #include using namespace std; int main() { cout << "Which character do you wish to count? "; char toCount = cin.get(); char c; int numChars = 0; while (cin.get(c)) if (c == toCount) numChars++; cout << "There were " << numChars << endl; return 0; }