Untitled
unknown
c_cpp
2 years ago
310 B
5
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...