include <iostream>
using namespace std;
/*
int print(char* p);
int main()
{
int n = 100;
int* p = &n;
int** q = &p;
int*** w = &q;
cout << "n = " << n<< endl;
cout << "p = " << p<< endl;
cout << "q = " << q<< endl;
cout << "*w = " << ***w<< endl;
cout << "*&n - *p = " << &n - p<< endl;
//a[10]
int* a = NULL;
cin >>n;
a = new int[n];//申请数组
delete a; //删除 地址指针。
cout << "a = " << a<< endl; //输出的是a[10]的首地址
}
*/
int main()
{
char a[20];
int leng =0;
int i =0;
cin >> a;
while(a[i]!=0)
{
if(a[i++] == 'a')
leng++;
}
cout << leng<<endl;
}
网友评论