计算数字个数 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<ctype.h>int main(void){ char ch; int count = 0; wh…… 题解列表 2019年02月16日 0 点赞 0 评论 761 浏览 评分:0.0
2002题解方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char a[100]; int i,t=0; gets(a); for(i=0;a[i]!='\0&#…… 题解列表 2024年11月22日 0 点赞 0 评论 136 浏览 评分:0.0
编写题解 2002: 计算数字个数(Python) 摘要:解题思路:题解一:通过遍历字符串判断字符是否为数字参考代码:n=input() s1=0 for i in n: if i.isdigit(): s1+=1 prin…… 题解列表 2024年03月05日 0 点赞 0 评论 178 浏览 评分:0.0
2002: 计算数字个数 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cmath> #include<algorithm> using namespace std; int m…… 题解列表 2023年10月19日 0 点赞 0 评论 93 浏览 评分:0.0
统计数字,正则表达式写法 摘要:解题思路:利用正则表达式注意事项:思路简单,但是要注意过程参考代码:import java.util.Scanner;import java.util.regex.Matcher;import jav…… 题解列表 2023年05月06日 0 点赞 0 评论 129 浏览 评分:0.0
2002: 计算数字个数 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<string.h> int main() { char arr[100]={0}; int…… 题解列表 2023年01月03日 0 点赞 0 评论 112 浏览 评分:0.0
2种方法写题解 摘要:解题思路:注意事项:参考代码:a= input()k=0for i in a: if 47<ord(i) and ord(i)<58: #ASCII码判断是不是数字 k+=1pr…… 题解列表 2022年10月25日 0 点赞 0 评论 281 浏览 评分:0.0
计算数字个数(C语言) 摘要: #include int main() { char s[1024]; int t=0; scanf("%s",s);…… 题解列表 2022年07月14日 0 点赞 0 评论 333 浏览 评分:0.0
ASCII码计算数字个数 摘要:解题思路:使用ASCII码来判断是否为数字字母之类的,应该算是一个比较笨的方法了。需要使用ord()来调出每个字符的ASCII码,然后根据0的ASCII为48,9为57来划定判断范围。当然了看了其他题…… 题解列表 2022年05月16日 0 点赞 0 评论 272 浏览 评分:0.0
计算数字个数 摘要:解题思路:用字符串注意事项:i的下标是0参考代码:#include<bits/stdc++.h>using namespace std;string z;long long s;int main(){…… 题解列表 2022年05月07日 0 点赞 0 评论 139 浏览 评分:0.0