原题: 用赋初值的方法把字符串 “ C is a general purpose, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system.” 存放到字符数组s中,编程统计其中的大写字母、小写字母、数字、空格、逗号的个数。
代码:
#include
using namespace std;
int main()
{
char c;
int smallletters = 0, largeletters=0,space = 0, digit = 0,douhao=0, other = 0;
cout
关注
打赏