/* Write a program to read in a string using getline and to 
count the number of uppercase letters in the string.
*/
#include <iostream>
#include <string>
using namespace std;
int main()
{
        string s;
        int i, count = 0;
        cout << "Enter a string: " << endl;
        getline(cin,s);
        for (i = 0; i < s.size(); i++)
		if (isupper(s[i]))
            	// if (s[i] >= 'A' && s[i] <= 'Z') // OK
			count++;
        cout << "The number of uppercase letters in the "
		<< "input is: " << count << endl;
        return 0;
}

