
Patrick B. answered 04/27/21
Math and computer tutor/teacher
using namespace std;
#include <iostream>
#include <string>
int main()
{
string inbuff;
cout << "Input :>";
getline(cin,inbuff);
int strLen = inbuff.length();
int eCount=0;
for (int iLoop=0; iLoop<strLen; iLoop++)
{
char ch = inbuff[iLoop];
if (ch=='e' || ch=='E')
{
eCount++;
}
}
cout << "The letter E appears >" << eCount << " times in the string >"<< inbuff << "<" << endl;
}