数字的处理与判断c语言题解 摘要:解题思路:这题可以分成三个用户自定义函数来实现3个功能注意事项:这是个人想法,没有看题解参考代码:#include <stdio.h> int Num(int sum); void separat…… 题解列表 2024年10月26日 1 点赞 0 评论 498 浏览 评分:9.9
最原始的方法 因为我只学到这 摘要:解题思路: 最原始的方法 肯定都看得懂注意事项:参考代码:#include<stdio.h>int main(){ int a; scanf("%d",&a); if(1<=(a/10000)&&(a…… 题解列表 2024年10月23日 5 点赞 0 评论 765 浏览 评分:10.0
1009: [编程入门]数字的处理与判断 (C语言)不用循环 只用选择 摘要:原题:[编程入门]数字的处理与判断 - C语言网 (dotcpp.com) 参考代码: #include int main(){ int x,a,b,c,d,e; char y; scan…… 题解列表 2024年10月14日 1 点赞 0 评论 629 浏览 评分:9.9
用最朴素的C语言(不用数组,字符)解决这类问题 解题思路:通过循环的方式使a反复除以10,直至a==0,程序终止,可求得a的位数。再进行分类讨论,因为位数不同情况也不同。注意事项:一定要把数据a存到数据b里,因为循环之后a最终会==0,导致之后输出的结果有误,即00000参考代码:#includeintmain(){inta, 题解列表 2024年10月07日 0 点赞 0 评论 607 浏览 评分:9.9
数字的处理与判断(字符串函数解法) 解题思路:利用字符串来存储数字,用strlen()函数得到数字长度;利用for循环将字符串从左到右遍历输出(空格);利用for循环将字符串从右到左遍历输出;注意事项:1、在开头添加库函数#include;2、每次输出都要换行;3、注意输入输出格式。 题解列表 2024年09月14日 0 点赞 0 评论 425 浏览 评分:0.0
编写题解 1009: [编程入门]数字的处理与判断 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>#include<string.h>int main(){ int x,count; …… 题解列表 2024年09月06日 0 点赞 0 评论 410 浏览 评分:0.0
对于这个问题,直接用暴力算法,直接求解 摘要:参考代码:#include<stdio.h>int main(){ int a=0,d=0,n=0; scanf("%d",&a); d=a; int flag=1; while(flag==1){ …… 题解列表 2024年08月04日 0 点赞 0 评论 428 浏览 评分:0.0
题解 1009 数字的处理与判断 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b,c,d,e,x; int i = 0,j,k; scanf("%…… 题解列表 2024年07月07日 0 点赞 0 评论 411 浏览 评分:0.0
对大佬的拙劣模仿和一丢丢改变 摘要:解题思路:将大佬第一个循环用for实现,并且保留了处理0的思路注意事项:无参考代码:#include <stdio.h>#include <math.h>int main(){ int num = 0…… 题解列表 2024年05月18日 0 点赞 0 评论 552 浏览 评分:8.0
【编程入门】数字的处理和判断 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <string.h> int main() { char a[10]; int i,we…… 题解列表 2024年04月17日 0 点赞 0 评论 720 浏览 评分:0.0