二级C语言-统计字符 摘要:解题思路:定义四个字符,统计字母,空格,数字,其他字符的数量用gets()读取输入的一行所有数据注意事项:在for循环中,开始没注意到,习惯性写了for(i=0;i<=N;i++),这样就会往后读取一…… 题解列表 2023年07月07日 0 点赞 0 评论 130 浏览 评分:0.0
二级C语言-统计字符 摘要: import java.util.Scanner; public class Main { public static void main(String[] args) { S…… 题解列表 2023年09月20日 0 点赞 0 评论 764 浏览 评分:0.0
代码的尽头是优雅 摘要:解题思路:读取一行字符,遍历每个字符,定义计数器注意事项:注意读取空格参考代码:import java.util.Scanner;public class Main { static Scann…… 题解列表 2023年11月17日 0 点赞 0 评论 122 浏览 评分:0.0
1063: 二级C语言-统计字符 摘要:```python ss = input() # 英文字母、空格、数字和其它字符 alpha,space,num,other=0,0,0,0 for i in ss: if i.is…… 题解列表 2023年12月20日 0 点赞 0 评论 134 浏览 评分:0.0
二级C语言-统计字符 摘要:解题思路:可使用cin.get()拿到带空格的字符或者cin.getline()可使用strlen求出数组长度注意事项:需要包含头文件#include<bits/stdc++.h>参考代码:#incl…… 题解列表 2024年01月30日 0 点赞 0 评论 242 浏览 评分:0.0
1063: 二级C语言-统计字符 摘要:解题思路:注意事项:参考代码:s = input() a,b,c,d = 0,0,0,0 for i in s: if i.isalpha(): a += 1 …… 题解列表 2024年04月29日 2 点赞 0 评论 430 浏览 评分:0.0
基础c语言代码 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char arr[100] = { 0 }; int a = 0…… 题解列表 2024年05月07日 0 点赞 0 评论 210 浏览 评分:0.0
二级C语言-统计字符(简单易学) 摘要:解题思路:两种解题方案第一:确定循环类型(用循环解题)第二:找循环条件(用函数解题)注意事项:(千万不要以数组去解,如果遇到不知长度的字符就遭殃了)这也是许多学者放的毛病。参考代码:第一种方法(函数解…… 题解列表 2024年05月18日 0 点赞 0 评论 214 浏览 评分:0.0
1063统计字符 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#include<stdlib.h>int main(){ char a[100]; gets(a)…… 题解列表 2024年05月25日 0 点赞 0 评论 254 浏览 评分:0.0
1063: 二级C语言-统计字符 题解 摘要:```c #include #include void fun(char arr[]){ int a=0,b=0,c=0,d=0,i=0; while(arr[i]!='…… 题解列表 2024年08月05日 1 点赞 0 评论 224 浏览 评分:0.0