函数题:统计英文字母的个数
编写函数
int countAlpha(const char *s);
返回字符串s中英文字母的个数。
### 函数接口定义:
c++
在这里描述函数接口。例如:
int countAlpha(const char *s);
其中 s 是用户传入的字符串。 函数返回字符串 s 中英文字母的个数。如果字符串 s 中没有英文字母,则返回0。
### 裁判测试程序样例:
c++
在这里给出函数被调用进行测试的例子。例如:
#include <stdio.h>
int countAlpha(const char *s);
int main(void)
{
char s[100];
gets(s);
printf("%d", countAlpha(s));
return 0;
}
/* 请在这里填写答案 */
### 输入样例:
在这里给出一组输入。例如:
in
963AfBy@ t7
### 输出样例:
在这里给出相应的输出。例如:
out
5
答案:若无答案欢迎评论
int countAlpha(const char *s);
返回字符串s中英文字母的个数。
### 函数接口定义:
c++
在这里描述函数接口。例如:
int countAlpha(const char *s);
其中 s 是用户传入的字符串。 函数返回字符串 s 中英文字母的个数。如果字符串 s 中没有英文字母,则返回0。
### 裁判测试程序样例:
c++
在这里给出函数被调用进行测试的例子。例如:
#include <stdio.h>
int countAlpha(const char *s);
int main(void)
{
char s[100];
gets(s);
printf("%d", countAlpha(s));
return 0;
}
/* 请在这里填写答案 */
### 输入样例:
在这里给出一组输入。例如:
in
963AfBy@ t7
### 输出样例:
在这里给出相应的输出。例如:
out
5
答案:若无答案欢迎评论