#3863. 大写字母统计
大写字母统计
大写字母统计
题目描述
写一个函数,找出给定字符串中大写字母字符(即'A'-'Z'这26个字母)的个数(如字符串”China Computer Wrold”中大写字母字符的个数为3个)。要求用子函数和Driver的形式编写代码。
input:
helloABCworld
output:
3
输入说明
字符串,可能包含空格
输出说明
大写字母的个数
样例
输入
hello ABC world
输出
3
写一个函数,找出给定字符串中大写字母字符(即'A'-'Z'这26个字母)的个数(如字符串”China Computer Wrold”中大写字母字符的个数为3个)。要求用子函数和Driver的形式编写代码。
input:
helloABCworld
output:
3
字符串,可能包含空格
大写字母的个数
hello ABC world
3