S001-AC.cc 183 Bytes Edit Raw Blame History 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 #include <iostream> using namespace std; int main() { char c; int n=0,x=0; do { cin >> c; if(c == 'a') { x++; } }while(c != '.'); cout << x << endl; return 0; }