您当前的位置: 首页 >  c++

川川菜鸟

暂无认证

  • 3浏览

    0关注

    969博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

C++:统计字符串内大小写字母,数字空格,逗号等

川川菜鸟 发布时间:2020-12-09 17:35:54 ,浏览量:3

原题: 用赋初值的方法把字符串 “ 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             
关注
打赏
1665165634
查看更多评论
0.0924s