#include <iostream>
#include <string>
using namespace std;
int lowerCount(string s);
int main()
{
	string s;
	cout << "Enter a string: " << endl;
	getline(cin,s);
	cout << "There are " << lowerCount(s)  
		<< " lowercase letter in " << s 
		<< endl;
	return 0;
}
/* The following function counts the number of 
lowercase letters in its input parameter s and 
returns the count via its return statement.
*/
int lowerCount(string s)
{
	int i, n = s.size(), count = 0;
	for (i = 0; i < n; i++)
		if (s[i] >= 'a' && s[i] <= 'z')
			count++;
	return count;
}
