首页 > 其他 > 详细

P5015 标题统计

时间:2019-04-07 21:33:36      阅读:103      评论:0      收藏:0      [点我收藏+]

P5015 标题统计

‘   ’ 不等于空格,空格是个字符

 

 

代码:

#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cstring>
using namespace std;
int main()
{
    char a[100];
gets(a); //可以读入整行字符串
int len=strlen(a);
int m=len; //防止在检查过程中len被更改
for(int i=0;i<=len;i++) { if(a[i]== ) m--; //不计“ ”数目 }
cout
<<m; return 0; }

 

P5015 标题统计

原文:https://www.cnblogs.com/xiaoyezi-wink/p/10427566.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!