/* Uppercase Characters program */

#include <iostream.h>
#include <lvpvector.h>
#include <lvpstring.h>

using namespace std;	// October 5, 2001

int main()
{
	const char Low = 'A';
	const char High = 'Z';
	lvpvector<int> Count(High-Low+1, 0);

	lvpstring S;
	cout << "Enter a string:" << endl;
	getline(cin, S);

	// Count frequency of uppercase characters
	for (int index=0; index<S.length(); index++) {
		char Letter = S[index];
		if ((Letter >= Low) && (Letter <=High))
			Count[Letter-Low]++;
	}

	// Display counts
	for (char Letter=Low; Letter<=High; Letter++)
		cout << Letter << "  " << Count[Letter-Low] << endl;

	return(0);
}

