CaseCount9a - i // Complete the initialization, loop and...

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;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: i // Complete the initialization, loop and post loop // pieces of this program. cout &lt;&lt; &quot;Enter leters both upper case and lower case&quot; &lt;&lt; endl; cout &lt;&lt; &quot;press enter for the program to stop: &quot;; cin.get (lettr); do { if ((lettr &gt;= 'A') &amp;&amp; (lettr &lt;= 'Z')) charactrCtr++; cin.get (lettr); }while (lettr != '\n'); cout &lt;&lt; endl; cout &lt;&lt; &quot;The numbers of upper case letters is: &quot; &lt;&lt; charactrCtr &lt;&lt; endl; c return 0; } // end of main...
View Full Document

Ask a homework question - tutors are online