Untitled
unknown
c_cpp
2 years ago
310 B
13
Indexable
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main() {
string str;
int count = 0;
cin >> str;
for (int i = 0; i < str.length(); i++) {
if (str[i] == 'a') {
count++;
}
}
cout << count;
return 0;
}Editor is loading...