学好英语走遍天下(但不能忘本) 摘要:解题思路:我们可以发现一句英文是由三部分组成(单词,空格,标点符号)然后我们可以发现每两个单词中间就有一个空格,那么我们只要对接收到的字符串,统计它中空格的数量,那么单词数量就是空格数量加1。注意事项…… 题解列表 2022年01月19日 0 点赞 0 评论 272 浏览 评分:9.9
单词个数统计题解 摘要:解题思路:利用scanf遇空格停止输入的特性,很容易就可以想到怎么写注意事项:参考代码:#include<stdio.h>int main(){ char a[1000]; int i=0…… 题解列表 2022年02月04日 0 点赞 0 评论 172 浏览 评分:9.9
蓝桥杯算法提高VIP-单词个数统计(c) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<string.h> #include<ctype.h> #define M 101 int main() …… 题解列表 2022年02月11日 0 点赞 0 评论 257 浏览 评分:9.9
简单易懂,极简 摘要:解题思路:注意事项:参考代码:int main(){ int x = 0; int y = 0; while ((x = getchar()) != '\n') { if (x ==…… 题解列表 2022年04月30日 0 点赞 0 评论 191 浏览 评分:9.9
巧用strtok()函数,不到15行代码搞定 摘要:解题思路:通过strtok()函数的返回值来判断个数注意事项:注意strtok()函数的用法参考代码: #define _CRT_SECURE_NO_WARNINGS#include#includei…… 题解列表 2022年10月03日 0 点赞 0 评论 204 浏览 评分:9.9
(史上最简单版)单词个数统计 摘要:解题思路:这里我们可以知道单词与单词之间隔着一个空格,所以我们只要统计空格个数,最后加一即可注意事项:这里我们要用到一个头文件就是如下第二行代码,这个可以统计数字,空格,等字符的个数,所以非常方便参考…… 题解列表 2022年11月20日 0 点赞 0 评论 208 浏览 评分:9.9
蓝桥杯算法提高VIP-单词个数统计 摘要:#include<bits/stdc++.h> using namespace std; int main(void){ int cnt=1; string s; getline(ci…… 题解列表 2022年12月06日 0 点赞 0 评论 177 浏览 评分:9.9
1505: 蓝桥杯算法提高VIP-单词个数统计 摘要:```cpp #include #include using namespace std; int main() { char a[80]; gets(a); …… 题解列表 2023年01月30日 0 点赞 0 评论 175 浏览 评分:9.9
LikeWater - 1505: 蓝桥杯算法提高VIP-单词个数统计 摘要:```cpp #include using namespace std; // 题目描述 // 编写一个程序,输入一个字符串(长度不超过80), // 然后统计出该字符串当中包含有多少个单词…… 题解列表 2023年02月27日 0 点赞 1 评论 118 浏览 评分:9.9
1505: 蓝桥杯算法提高VIP-单词个数统计——Ccp 摘要:解题思路:注意事项:参考代码:#include<string.h>int main(){ char str[80]; int i; gets(str); int counts=0; for(i=0;i…… 题解列表 2023年03月09日 0 点赞 0 评论 152 浏览 评分:9.9