发布网友 发布时间:1天前
共1个回答
热心网友 时间:3分钟前
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
cin >> str;
size_t pos;
int count = 0;
while (string::npos != (pos = str.find('a', pos)))
{
count++;
pos++;
}
cout << count << endl;
return 0;
}