CaseCount9b - pieces of this program cout<<"Enter...

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

View Full Document Right Arrow Icon
// filename: CaseCount.cpp // author: j. dzuback // modified: // date: 10/03/09 / /* ********************************************** The program prompts the user for a series of characters, etc. entered via the keyboard, and counts the number of characters (and terminates) per the instructions for each problem. .. ********************************************** */ #include <iostream> #include <iomanip> # using namespace std; u int main() { char lettr; int charactrCtr = 0; i // Complete the initialization, loop and post loop
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // pieces of this program. cout << "Enter leters both upper case and lower case" << endl; cout << "press enter for the program to stop: "; cin.get (lettr); do { if ((lettr >= 'A') && (lettr <= 'Z')) charactrCtr++; cin.get (lettr); if ((lettr >= '1') && (lettr <='9')) break; }while (lettr != '\n'); cout << endl; cout << "The numbers of upper case letters is: " << charactrCtr << endl; c return 0; } // end of main...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online