C++ 数组 输入一行字符串(长度小于80个字符,只有字母和数字),统计其中大写字母、小写字母和数字的个数

日期:2019-10-15 19:48:49 人气:1

C++ 数组 输入一行字符串(长度小于80个字符,只有字母和数字),统计其中大写字母、小写字母和数字的个数

源程序代码以及算法解释如下: #define _CRT_SECURE_NO_WARNINGS//VS环境下需要,VC不需要 #include #include int main() { const int n = 80; int i = 0; char str[n] = { NULL };//字符数组 int Numb_count = 0;//数字个数 int ABC_count = 0;//大写字母个数 int abc_c
    A+
热门评论