//统计某个字符在字符串中出现的次数,不区分大小写
#include <iostream>
#include <cmath>
using namespace std;
int counter=0;
void count(char *p,char c)
{
while (*p)
{
if(*p==c || ::fabs(*p-c)==32)
{
counter++;
}
*p++;
}
}
int main(){
char a[100]={"HELLO world"};
char c='l';
count(a,c);
cout<<counter<<endl;
return 0;
}