Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
275 B
3
Indexable
#include <iostream>
#include <string>

using namespace std;

int main()
{
    string a;
    int count = 0;

    cin >> a;
    
    for (int i = 0; i < a.length(); i++) {
        if (a[i] == 'a') {
            count += 1;
        }
    }
    cout << count;
}